Original Post
Hi this is my first post here. Wondering anyone might be able to offer any advice on a problem that i got stuck on while trying to render shadows in an Opengl application. I render the scene from the light's point of view using OpenGL into the shadow map which is the pretty standard method. However from here on I do not render the scene for a second pass as usual but use a fragment shader instead to create the final render.(Reason is due to some thesis project I'm working on) Therefore I will like to know how can i get the scalar depth values from the shadow map so that i can store them in a 2-dimensional array(u,v) where I can easily access them for use in my fragment shader. Thanks in advance for any help. one other question: those pixels on the shadow map where nothing is rendered on/no depth value, are they given a 0 or NULL or undefined value...or watever??? Thanks Regards, Jason