Stencil shadows not working

Started by
4 comments, last by polyfrag 11 years, 7 months ago
I copied the tutorial at gametutorials.com but it isn't working

stencilshadow.jpg
Advertisement
Double post wacko.png

Programming != Copy'n'Paste
Oops, I meant shaddow mapping. Stencils have nothing to do with this.
Fixed, I didn't know that the model texture was interfering with the shadow map.

Now I use multi-texturing:

glActiveTextureARB(GL_TEXTURE0_ARB);
glUniform1iARB( texture1, 0 );
glActiveTextureARB(GL_TEXTURE1_ARB);
glUniform1iARB( texture2, 1 );
glActiveTextureARB(GL_TEXTURE2_ARB);
glUniform1iARB( shadowMap, 2 );
I got the GLSL shadows working from a different example but now the bitmap fonts don't work with the shaders. Anybody know why?
Oh, fixed. I had to do this before rendering text:


glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, NULL);

glActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, NULL);

glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, NULL);

This topic is closed to new replies.

Advertisement