Archived

This topic is now archived and is closed to further replies.

Mari_p

working with only one 1024x1024 texture. Is it a good idea?

Recommended Posts

Mari_p    232
Hi, I''m using sixteen 256x256 textures. To avoid texture switches, do you recommend to put them into one 1024x1024 texture? My card supports until 2048x2048 format. Thanks.

Share this post


Link to post
Share on other sites
Fidelio66    164
No problem. The voodoo cards only supported 256x256 but starting with the old TNT card all cards support 2048x2048. The exception is I think the Kyro which only supports 1024x1024.

Share this post


Link to post
Share on other sites
Mari_p    232
Thanks for the replies.
My card is a TNT2. Some of my textures have a alpha channel (TGA 32 bits). The others are BMP.
I intend to use only one 1024x1024 TGA texture. Can my fps decrease?

Share this post


Link to post
Share on other sites
BillPo    122
I''m guessing that since you''ll be doing less texture changes if any at all that your fps can only go up from here. Texture changes are something that you''d ideally want to keep to minimum and zero changes is definitely a minimum.

Other than that I don''t think much else will affect your program''s performance. But then again, I don''t know how much improvement you''ll see either. 16 texture changes vs no texture changes probably isn''t that huge of a difference.

Share this post


Link to post
Share on other sites
AndyTX    806
According to the DirectX documentation though, 256x256 textures are the fastest (I''d expect this as well, because they align on bits the best).

I''d only use larger textures to AVOID having to split up larger images... ie. don''t bother splitting a 512x512 image into 4 tiles in the modern day-and-age, but don''t artificially inflate your texture sizes. "SetTexture" commands are plenty-fast enough if they are correctly batched.

Share this post


Link to post
Share on other sites
DrunkenHyena    805
Combining textures into a larger page can save more than just SetTexture switches. Far more importantly it makes it easier to get larger batches per DrawPrimitive call.

And while it is documented that 256x256 are the fastest, I haven''t seen anything measurable to back that up (at least as it applies to this topic). I have definitely seen performance increases from reducing SetTextures (slight) and from making bigger batches (significant).


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
nlo    130
yes, i''m doing similar thing with my game engine, i mostly use 512x512 texture, for cleaner/simplier SetTexture & DrawPrimitive batching, very good in static VB objects.

Share this post


Link to post
Share on other sites
EvilDecl81    360
quote:
Original post by DrunkenHyena
Combining textures into a larger page can save more than just SetTexture switches. Far more importantly it makes it easier to get larger batches per DrawPrimitive call.

And while it is documented that 256x256 are the fastest, I haven''t seen anything measurable to back that up (at least as it applies to this topic). I have definitely seen performance increases from reducing SetTextures (slight) and from making bigger batches (significant).


Stay Casual,

Ken
Drunken Hyena



Depends what you are doing, texture caches on GPU''s are pretty tiny so if you access them in some random way you will notice huge perf differences between texture sizes. Any easy way to see this is to do enviroment mapping - the size of the enviroment map makes a big difference in perf.

Basically, the only way to know is to try.

Share this post


Link to post
Share on other sites
DrunkenHyena    805
quote:
Original post by EvilDecl81
Depends what you are doing, texture caches on GPU''s are pretty tiny so if you access them in some random way you will notice huge perf differences between texture sizes. Any easy way to see this is to do enviroment mapping - the size of the enviroment map makes a big difference in perf.


Of course, everything depends on what you''re doing. Since the OP didn''t really say we can only guess. When someone mentions combining many textures into a single one I assume (perhaps incorrectly) that they''re doing something with tiles and/or sprites. In this case (in general) the win you get by being able to produce large batches for DrawPrim are far more significant than the other issues.

Obviously this does not apply in every case.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites