PDA

View Full Version : GL_ARB_multitexture decaling



Frumpy
03-30-2001, 08:39 AM
This is a repost from the Beginners forum which didn't generate many responses.
My experiements with GL_ARB_multitexturing so far with one base texture and two decals over two passes work. Thanks to all who've helped me get this far. But out of curiosity I decided to try adding a third decal like this
alpha test on (greater,0.5)
Pass1.TexUnit0.basetexture.GL_REPLACE = visible
Pass1.TexUnit1.decal1.GL_DECAL = visible
draw quad
Pass2.TexUnit0.decal2.GL_REPLACE = visible
Pass2.TexUnit1.decal3.GL_DECAL = not visible
draw quad
alpha test off
Out of total *despiration* I've also tried these other combos for Pass2:
TexUnit0.decal2.GL_REPLACE = not visible
TexUnit1.decal3.GL_REPLACE = visible

TexUnit0.decal2.GL_REPLACE = not visible
TexUnit1.decal3.GL_MODULATE = not visible

TexUnit0.decal2.GL_REPLACE = not visible
TexUnit1.decal3.GL_BLEND = not visible

TexUnit0.decal2.GL_DECAL = visible
TexUnit1.decal3.GL_DECAL = visible
// background all white (no base texture or decal1)

TexUnit0.decal2.GL_DECAL = not visible
TexUnit1.decal3.GL_REPLACE = visible

TexUnit0.decal2.GL_DECAL = not visible
TexUnit1.decal3.GL_MODULATE = visible

TexUnit0.decal2.GL_DECAL = not visible
TexUnit1.decal3.GL_BLEND = visible (inverted colors)

TexUnit0.decal2.GL_MODULATE = visible
TexUnit1.decal3.GL_DECAL = not visible

TexUnit0.decal2.GL_MODULATE = not visible
TexUnit1.decal3.GL_REPLACE = visible

TexUnit0.decal2.GL_MODULATE = not visible
TexUnit1.decal3.GL_MODULATE = not visible

TexUnit0.decal2.GL_MODULATE = not visible
TexUnit1.decal3.GL_BLEND = not visible

TexUnit0.decal2.GL_BLEND = not visible
TexUnit1.decal3.GL_BLEND = not visible

TexUnit0.decal2.GL_BLEND = not visible
TexUnit1.decal3.GL_REPLACE = visible

TexUnit0.decal2.GL_BLEND = visible (inverted colors)
TexUnit1.decal3.GL_DECAL = not visible

TexUnit0.decal2.GL_BLEND = not visible
TexUnit1.decal3.GL_MODULATE = not visible

I've also tried adding glColor4f(1,0,0,0) before Pass2 and got no further. Depth testing is off. In addition I've double checked my decals and they have the correct alpha values. If anyone is curious I'm using a Geforce MX with nVidia driver v6.50. What more can I try?