Advertisement

Texturesize

Started by November 03, 2002 11:57 AM
4 comments, last by ProfEich 22 years, 4 months ago
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?
you don''t
textures can for some reason only be in powers of two

So for a 5x5 texture use 4x4 or 8x8
Since it''s all mipmapped there will be little difference
Advertisement
You can''t. Texture dimensions must be 2^n, where n is an integer.
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
Thx for your help @all =)
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

This topic is closed to new replies.

Advertisement