View Full Version : Tiling Sub-Textures
02-04-2004, 11:36 AM
A common thing Ive read to try and minimize switching texture states is to combine multiple images into a larger texture. The problem I have with this is that I dont know of a way to tile just a portion of a texture. Is there a way to do this? If not directly, possibly through pixel shaders? Would this even be worth the trade off?
Thanks in advance.
02-04-2004, 01:32 PM
You'll save time on switching textures but it will cost you CPU cycles and vertices with this solution; you could subdivide polygons that require the tiled texture and play with the texture coordinates at each point.
Actually, that would not be a good idea. You couldn't even get away with sending each inner vertex once. I'm glad I typed this out so I could shoot it down myself.
02-04-2004, 02:23 PM
Best will be to let this be done by the artist who makes the models with Maya or 3DS for example. He has the best tools to specify the texture coordinates. For him it is easy to combine some texture into a large one and setting proper texture coordinates.
02-05-2004, 08:39 PM
You can't tile a texture sheet.
Also, the cost of switching tetxures is really small these days, unless you're using so many textures that you're thrashing your VRAM.
As long as you sort by individual texture, it should be OK without sheeting. Assuming you're on a PC, that is -- something like the PS/2 is a different kettle of fish ;-)
Personally I think tiling subtextures is a very bad idea right now. Besides the performance issues, there's a very important thing when you consider functionalities. What would happen if a user writes a vertex program to translate texcoords over time? Uhm, it will look weird at least.
Sure you could code something to avoid this kind of problem, but I would rather spend my time in other ways.
Vary glad to see texture switching is so cheap anyway. That's good news.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.