Sign in to follow this  
Funkymunky

Render to Texture while rendering back faces

Recommended Posts

So, I've run into an interesting issue. I was originally rendering my shadows to the depth buffer, and had to enable front-face culling in order to not get any self-shadowing artifacts. I then decided to render to a 32-bit floating point texture (color data) instead. Suddenly, with nothing else changed, it's as if I'm not doing the culling; I'm getting all manner of self-shadowing artifacts mucking everything up.

Why would this be?

Share this post


Link to post
Share on other sites
Yeah this is almost certainly because you're not rendering the same value to the color map as you are to the depth map, or because the format is different. If you're going to take the performance hit of using a render target as a shadow map, then you might as well use a linear depth metric. It will give you a better distribution of precision, especially for floating point formats. It also makes it much easier to bias.

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