Masking and Lightmaps

Hello,
For my maps, I use 2 layers of mapping, 1 for standard texturing and the
other for lightmapping. Now I would like to use masking (to simulate wire
fences or things like that with only one textured square). So first I apply
the mask to the scene with glBlendFunc(GL_DST_COLOR,GL_ZERO);
So my questions:
1/ if I then apply my multitextured fence with glBlendFunc(GL_ONE,GL_ONE);
the mask will be applied to both texture layers?
If that doesn’t work, what’s the way to apply masks to 2-layer-textures?
Thanks, David

Hi David,

I’m thinking you probably want an alpha test (glAlphaFunc) for this. And yes, the alpha mask would apply to all layers. That is, the final resulting fragment will be rejected if it fails the alpha test. With alpha testing, holes in your fence will not contribute light to the scene behind it.

I hope this helps.