Jump to content
  • Advertisement
Sign in to follow this  
zurekx

Create shadow map and visualize it

This topic is 3803 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!