06 abril 2013

Screen Space shadow filtering

At the end, I figured out how to improve the shadows. I thought in a screen space blur, like a postprocess.
First I render the mesh only with shadows, save to texture and blur to use it as shadow in the final shader.
The first problem is obvious, edges must to be fixed:

Then I needed to find those edges. How? With the differente between the blurred depth and the original.

The perfect filter would be a bilateral filter (smart filter in photoshop) but instead getting mad doing it, I just tried to apply the idea by my self. Its not perfect, but works for now.

No hay comentarios:

Publicar un comentario