Monday, July 13, 2009

Fake Fullbrights

Just added fake fullbrights to the world render, and will be doing alias models shortly. They're not really fullbrights as they exist in the Quake 1 engine, just a greyscaling, bias and squaring of the base texture, but they certainly look effective.



It's one thing that always bothered me about the Quake II engine, but thankfully it's resolved now. Of course there's bad news - because they exist on pretty much every texture, using them tends to slow things down quite a bit. I've halved the size of them compared to the base texture to compensate a little, but be warned.

Of course they're optional, use "gl_fakefullbright" to switch them on or off. The default is off by the way, as they're an addition to the baseline QII render.

Oh, and I wish I'd discovered D3DTSS_TEXCOORDINDEX before. Oh well, I have done so now. That brings me to the next topic - I've ranted enough in the past about deficiencies in the Direct3D documentation, but - to balance matters - it's getting near time for a rant similar to the OpenGL one previously posted.

Back to fullbrights, and the topic of using them in DirectQ. For DirectQ I decided that fullbright colours are a baseline software Quake feature, and therefore they are an "always on" feature. I haven't provided an option to switch them off, and have no intention of doing so. The same applies to overbrights.

I've read that some feel that fullbrights and overbrights are something that should be optional, and even that perhaps the reason why software Q1 had them was because of technical limitations. This is not true. Software Quake uses it's colourmap for calculating lighting, which is basically a great big lookup table with 256 colours across the top and 64 gradations down the side, each of which is an index into the Quake palette. It looks like this:



Now, ID could have chosen anything from the Quake palette (in fact there is headroom as the colourmap only has 243 colours) but instead they chose the colours that they did. As far as I'm concerned that ends the story, and DirectQ will continue to have enforced fullbrights and overbrights.

0 comments: