Sign in to follow this  

Create shadow map and visualize it

Recommended Posts

I want to render a shadow map (i.e. render the depth to a texture). First question: Can I do it all by myself, using a fragment shader and glCopyTexImage2D? In that case, how do I setup the texture (internal format and so on). And how do I set the "color" from the fragment shader. I only want to set the color to the depth, by isnt the the fragment shader supposed to return 4 components? Secondly, can I use a shadow map as a texture? Right now Im trying to create a shadow map using an extension, and create the texture using GL_DEPTH_COMPONENT. But is there any way I can visualize the shadow map by just putting this texture on a quad or something?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this