Path: chuka.playstation.co.uk!news From: Developer Support Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: Texture Wrapping Date: Wed, 06 Aug 1997 14:25:00 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 51 Message-ID: <33E87B2B.4F6A@interactive.sony.com> References: <33E7381E.E55C5787@micronetics.com> <33E84C2C.6C25@interactive.sony.com> <33E8560F.BD1E57C1@micronetics.com> NNTP-Posting-Host: 194.203.13.10 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01 (Win95; I) Jim wrote: > > > Stuart, > > Thanks for the reply. > > Here is my reasoning. I have a polygon (lots infact) that are 400x400 > with a texture (64x64), was (128x128) but that affected performance too > much. The texutures are 16bit direct colour. > Could I set up the gpu to say draw one 400x800 polygon (for example) but > wrap the texture at 400x400 so the result would be the same as drawing > two planar connected 400x400 polys? > OK, I've been playing around, and if you set the RECT GsDRAWENV.tw to a window within the texture page you'll get a repeating texture eg setRECT(&GsDRAWENV.tw,0,0,64,64) assuming your texture is in the top left of the texture window). But you'll have to change it back when drawing other stuff. > As an aside is there any noticable speed difference between 16 direct, 4 > and 8 bit textures? I would assume 4 and 8 bit a tad slower because of > the clut lookup before it translates into a 16 direct in the frame > buffer as it draws the textured poly. Yes, there is a speed difference. For a texture of the same size 4 bit is fastest, 8 bit is next fastest, and 16 bit is slowest. This is simply due to the caching. > > Another aside, how does texture caching work? It is best to group polys > with the same textures together to avoid texture cache misses? Is it > true I can only cache 32x32 16bit direct textures? So would I see more > of a speed increase if I make the textures 32x32, than when I went from > 128x128 to 64x64, because it will now fit in the cache? > > Cheers > > -JiM Yes, if you can draw all the polys with one type of texture together you'll get a better cache hit, hence a speed up. And yes again, only a 32x32 16bit texture will fit in the cache and you'd see a big increase in speed if you changed to this size. For 8bit 32x64 will fit in the cache and for 4bit 64x64. I really recommend getting your textures to fit in the cache, it will make big difference to your drawing time. Stuart