Jump to content
  • Advertisement

Archived

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

ProfEich

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.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!