Multitexture + Blending

It seems as though enabling multitexture enables me to use textures+lightmaps with the Depth-Buffer ON, whereas I used to have to disable depth-testing when applying the lightmaps. Thats pretty cool…

Okay…the questions:

  1. Is there any other advantage to multi-texturing besides what i just said and the speed?

  2. I had a look at Quake and it does its lightmap blending with GL_BLEND, whereas if i try that in my prog, it looks very screwed… Is this because indexed color (quake) modes do blending differently? I personally use GL_MODULATE…

Thanks in adv.

[This message has been edited by drakaza (edited 08-06-2000).]


In multi-pass rendering, you should not disable depth testing after the first pass. You should, instead, set the depth function to GL_EQUAL and the depth mask to GL_FALSE. This way, only the fragments with the same depth as those visible in the first pass will be written in the subsequent passes.

Your code should look something like:

// first pass


// all subsequent passes


Hope this helps…


Oh…so I have been doing it very wrong?

Thanks very much for that input. Very helpful