Hi All,
I am having problems getting the filtered result of Depth comparisons of the shadowmap in the alpha layer.
My shadowmap looks like this…
glBindTexture(GL_TEXTURE_2D, m_texShadowMap);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_COMPARE_FUNC_ARB, GL_LEQUAL);
glTexImage2D(GL_TEXTURE_2D, 0,GL_DEPTH_COMPONENT16_ARB , m_nShadowMapSize[0], m_nShadowMapSize[1],0,GL_DEPTH_COMPONENT,GL_FLOAT,NULL);
if I use
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_COMPARE_MODE_ARB,GL_ALPHA )
it doesn’t work. And if I try to send it from the RGB layer to Alpha with the combiners like it is the same problem.
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_ARB, GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV,GL_SOURCE0_ALPHA_ARB, GL_TEXTURE);
glTexEnvi(GL_TEXTURE_ENV,GL_OPERAND0_ALPHA_ARB, GL_SRC_COLOR);
I’ll be glad if i can find a solution to this…