Rendering drivers(solved)
-
- Posts: 1691
- Joined: Sun May 18, 2008 9:42 pm
thanks
Thanks for the help.
That would be illogical captain...
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
haha you evil one! you confused him more!Dorth wrote:what is the calculation to find out? Are you serious?
log[base 2](size_of_texture) = exponent
you take (int)exponent and you got the lowest pow of 2
if exponent == (int)exponent then size_of_texture is already a pow of 2
if you don't want to lose details, you probably want to go to the highest pow of 2, which is (int)exponent +1
to find the closest, simply compare which is smaller, size_of_texture - 2^(int)exponent or 2^(int)(exponent+1) - size_of_texture
ok these are powers of 2 :
2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,i_dont_think_you_will_be_using_larger_textures,..
never forget 1 is a pow2, and it works on even the oldest cards. It's stupid, but 1d texture and full color images use it
and I'm sorry, but logs are what, high school lvl or something? They are so easy, they are the inversion of powers and you just MUST know them if you,re gonna code... Especially 3d
and I'm sorry, but logs are what, high school lvl or something? They are so easy, they are the inversion of powers and you just MUST know them if you,re gonna code... Especially 3d