Rendering drivers(solved)

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
3DModelerMan
Posts: 1691
Joined: Sun May 18, 2008 9:42 pm

thanks

Post by 3DModelerMan »

Thanks for the help. :D
That would be illogical captain...

My first full game:
http://www.kongregate.com/games/3DModel ... tor#tipjar
Mirror
Posts: 218
Joined: Sat Dec 01, 2007 4:09 pm

Post by Mirror »

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
haha you evil one! you confused him more!

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,..
Dorth
Posts: 931
Joined: Sat May 26, 2007 11:03 pm

Post by Dorth »

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
Post Reply