Thursday, December 11, 2008

Let there be lightmaps!



I went with 64 bit in the end; 128 bit is a floating point format which would totally play havoc with performance. As it is, I still need to bitshift by 1 and do a 4x modulate blend to get the correct scale, as blocklights can exceed 65535 at times.

Nonetheless, the extra headroom is well worth it, eh? No stair-step effects either (well, a lot less than GLQuake with a similar light level enabled).

I still support 32 bit lightmaps if your card isn't able to do 64 bit textures, but it's a deprecated mode. I suppose this would be equally as easy to do in OpenGL, and I do highly recommend it.

Lightmap modifcation, by the way, is done. It's actually quite fast, seems faster than GL.

I've temporarily removed entities/etc pending a reworking of the horrible code I had previously written.

0 comments: