Archived

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

LeLe

Texture Size Problem

Recommended Posts

LeLe    122
Must the texture image dimensions be the nth order of power 2. But if the source image isnot that dimension. How can I create a texture and use it.

Share this post


Link to post
Share on other sites
DrunkenHyena    805
G''day!

You basically have 2 options:
1)Add blank space around the image until the dimensions are powers of 2. Then you just change the texture coordinates to leave off the blank space. Very easy to do. It can be incredibly wasteful in terms of memory use though. For example, if your source image was 1026 pixels wide, you''d have to extend it to 2048, that''s a lot of waste. Situations like that are rare though.

2)Slice your image up into 2 or more sub-images that are powers of 2. This requires more effort, but you don''t waste tons of memory and it makes your large images more likely to work on something like a Voodoo (since they can''t handle textures larger than 256x256).

I guess there is a 3rd option, squish your image down to be a power of 2, but that''s rarely acceptable.


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites