Hoping someone can help.
I am following this tutorial. Tutorial 16 : Shadow mapping
I can get the code as presented working, but when I integrate what I think are the same concepts into my own framework, it doesn’t work. I do not get any errors detectable with glGetError(), just don’t get the right shadowing.
I have the shadow depth data stored in a depth texture per the tutorial, created with:
glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT16,
(BUint)x, (BUint)y, 0, GL_DEPTH_COMPONENT, GL_FLOAT, NULL);
I guess the first debug step is the check the data in the texture… but I don’t see how to do this. I am using an RGBA display - is there a way to project the data in the depth texture onto the screen so I can get some idea where the problem is? or any helpful debug utilities to read the depth texture & see if I actually have sensible data values in it?