Archived

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

ProfEich

Texturesize

Recommended Posts

Hi! I''ve got a little problem! If I create a 63x63 pixel big texture it wouldn''t shown. But if I use the same procedure with a size of 64x64 it''s shown! How can I use textures with a size of 63x63 or 5x5?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Textures have to be powers of 2. 1,2,4,8,16,32,64,128,256, etc (until the graphics cards limit). If you want to use odd numbers (lets use 63 for example). You must create memory for a 64x64 texture, and simply fill in the first 63 rows/columns and use only the 63x63 image out of that. You might as well just use a 64x64 image, since you''re using that much memory anyways. This limitation is so the graphics card can optomize it''s rendering functions (shifting instead of mults and divs).

Billy - BillyB@mrsnj.com

Share this post


Link to post
Share on other sites
quote:
Original post by Ferdinand the Bull
You can''t. Texture dimensions must be 2^n, where n is an integer.


Good point I explaine dmy GF (she is doing the art for my game) that the textures have to be powers of 2. Today, she asked me if she can use 384. So, I had to tell her that the textures have to be an INTEGER power of 2 :D

Share this post


Link to post
Share on other sites