Just added 64 bit lightmaps (for hardware that supports them) to the Quake II codebase. These are advantageous for two major reasons, with reason 1 being that you can configure them to use a much higher dynamic range, so that light doesn't get clamped to the max as quickly, and reason 2 being that they provide a much finer degree of quantization between individual steps of that range. This means that lighting looks smoother, and brighter spots are able to really bright.
Now the bad news - you'll have to double your value of gl_modulate in order to use them. So if you normally use gl_modulate 1, set it to 2, and if you normally use 2, set it to 4. Because gl_modulate now operates in hardware, there is no option above 4, so if you normally use 4 you will have to compensate by doubling your value of intensity. It's not quite the same end result, but close enough. If on the other hand you use intensity 4 and gl_modulate 4 all the time, you really need to get a brighter monitor!
I could remove the requirement to do this by simply changing one occurance of 127 to 255, but doing so would lose the extra dynamic range headroom. I'd rather sacrifice the ability to set gl_modulate too high than do this.
Of course, in DirectQ it's all handled using pixel shaders, so none of this is a problem.
I've decided to not get too hung up about performance with this engine. Naturally that doesn't mean that I'll intentionally write slow code for it, but it does mean that if something worthwhile impacts on performance, then the worthwhile thing is staying in. The exception of course is if a slideshow is the result, but something in the order of 60 FPS would be acceptable on the hardware I do most of my development on (it's currently getting almost double that, by the way, so there's a long way to go).
Saturday, July 11, 2009
Lightmaps! And Performance!
Posted by
mhquake
at
9:48 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment