lost hope
11-24-2003, 05:53 AM
hey guys,
i have a question regarding openGL/Cg. i posted it in the cgshaders.org forum, but i have a feeling that board gets a lot less exposure than this one, so here goes http://www.opengl.org/discussion_boards/ubb/wink.gif
so i'm using tex2DProj to get the float depth value from my shadow map (the shadow map texture is configured with: glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE) so that i don't get back just 1/0) at some pixel. now i need to convert that depth back to worldspace. is the best way to do that to embed a form of "gluUnproject" into my fragment program, and then run it on each depth value i get back from tex2DProj? has anybody done this before with any success?
i have a question regarding openGL/Cg. i posted it in the cgshaders.org forum, but i have a feeling that board gets a lot less exposure than this one, so here goes http://www.opengl.org/discussion_boards/ubb/wink.gif
so i'm using tex2DProj to get the float depth value from my shadow map (the shadow map texture is configured with: glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE) so that i don't get back just 1/0) at some pixel. now i need to convert that depth back to worldspace. is the best way to do that to embed a form of "gluUnproject" into my fragment program, and then run it on each depth value i get back from tex2DProj? has anybody done this before with any success?