• Advertisement
Sign in to follow this  

Render to Texture while rendering back faces

This topic is 2348 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

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
Advertisement
Are you sure this is to do with front/back face culling, or are you assuming so, because shadow acne was introduced when changing from a z-buffer to a F32 texture?


Are you rendering linear or non-linear Z values to your F32 texture?

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

  • Advertisement