Thursday, February 7, 2008

shadow2DProj Resolved

I'd like to offer a quick thanks to oc2k1 from the OpenGL message boards. He realized immediately that I was missing the following:


glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE, GL_COMPARE_R_TO_TEXTURE);


Alternatively, I could compare the value in the depth texture to the texCoord's z value myself, but I expect that this comparison is hardware accelerated.

If you're doing GLSL development, you might want to have a peek at Lumina. I'm going to be playing with it in the near future.

Thanks again to oc2k1, and the rest of the incredibly helpful people on the OpenGL message boards.

Andrew.

No comments: