Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: GsGetLw - Anyone? Date: Thu, 16 Jul 1998 10:28:54 +0100 Organization: Sony Computer Entertainment Europe Lines: 25 Message-ID: <35ADC7D6.103095A0@scee.sony.co.uk> References: <35ACE283.EEFA93ED@ndirect.co.uk> NNTP-Posting-Host: camfw01.millennium.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (Win95; I) Alex Herbert wrote: > > Can anyone tell me in simple terms what GsGetLw is for, or maybe > describe a situation where it would be used. Your 3D object is described in local coordinates, and must be transformed into World coordinates, and then finally into Screen coordinates before it can be drawn. GsGetLs creates a matrix which will perform these two transformations in one go. However, any lighting must be performed using the Local->World matrix. You set up the lighting in the GTE with the Local->World matrix. If you're not performing any lighting, then you can ignore this matrix, but if you want to perform lighting, then you call GsGetLws() which will return both the Local->World and the Local->Screen matrices. You then set the GTE's lighting parameters with the Local->World matrix (using GsSetLightMatrix() ), and the GTE's point transformation parameters with the Local->Screen matrix (using GsSetLsMatrix() ). Cheers, James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe A sufficiently advanced god would use evolution.