Skip to main content
GameDev.net gamedev.net
🔒 Locked

Render to Texture while rendering back faces

Started by Funkymunky Aug 17, 2011 at 2:53 AM 1 replies 1k views
Original Post
Funkymunky
Funkymunky
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?
Hodgman
Hodgman
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?
MJP
MJP
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.