Path: chuka.playstation.co.uk!news From: James Russell Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: 2d sprites in a 3d world Date: Mon, 07 Dec 1998 09:24:05 +0000 Organization: Sony Computer Entertainment Europe Lines: 41 Message-ID: <366B9EB5.B8FA3B6C@scee.sony.co.uk> References: <3659BEF7.663E@mdx.ac.uk> <3659D5B1.41EB5140@scee.sony.co.uk> <366959c3.522585@www.netyaroze-europe.com> NNTP-Posting-Host: mailgate.scee.sony.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.5 [en] (Win95; I) X-Accept-Language: en Robert Swan wrote: > > Probably pointless posting this unless James goes into the office over > the weekend, otherwise I'll just hassle him on Monday (that is if they > will let me in past the PSX3 dev kit!) No, that's just Mark Baker's green debug machine with "2" written in marker pen next to the PS symbol. It's fooled more than one visitor to the office. > When you scale down camera-relative z-depth of an object prior to > placing it into the OTable, you shift the depth to turn the 16bit > depth to match the OT depth. ie, > > OT length 1<<10 > Sort object, but shift by (16-10) = 6 > > With the sprite stuff with the routine you put up you shift it from a > z-depth of 14, ie, > > OT length 1<<10 > Sort 3d sprite, but shift by (14-10) = 4. > > Why the difference? Tis giving me a headache. Ah - you've spotted the Deliberate Mistake (cough). The GTE averages the 3/4 vertices of the quad, and uses the average as the offset into the OT (after the 14-OT_LENGTH shifting of course). Now to divide by 4, you just shift the 16 bit sum of all the vertices by 2 to the right. Which means that the value you've got left would have (as a maximum) bit 13 set. So that's why you subtract from 14. Now, a sprite doesn't have 4 vertices, so there's no point in shifting right by 2. The number of valid bits is actually 16, not 14. So for sprites, you should subtract from 16 instead of 14. James -- == James_Russell@scee.sony.co.uk +44 (171) 447-1626 == Developer Support Engineer - Sony Computer Entertainment Europe Sped up my XT; ran it on 600v! Works greO?_~" NO CARRIER