#### Archived

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

# Texturesize

This topic is 5884 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## 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 on other sites
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

##### Share on other sites
You can''t. Texture dimensions must be 2^n, where n is an integer.

##### Share on other sites
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 on other sites
Thx for your help @all =)

##### 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

1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633701
• Total Posts
3013435
×