Normal Mapped Screen Space Diffuse Occlusion

Started by Stefan, September 01, 2009, 06:15:06 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stefan

QuoteWith everyone doing SSAO these days I decided to give it a try too. I developped an extension of the algorithm, that shows how to add high frequency details to the ambient occlusion term. The technique uses 3 color components to store the occlusion over each third of the hemisphere for each sampling position (whereas standard SSAO samples over a 'whole' hemisphere for each pixel in screen space). Each component is then blurred using a so-called 'bilateral filter' as usual. In this work I did a separate edge filter pass before the blur. In the end, the normal map is read, and occlusion is computed by using a weighting of the normal with respect with each sampling direction. This is very similar to the source shading used in half-life 2, but applied to screen space. The executable also has additionnal features such as diffuse bleeding. The technique can somewhat enhance environments where baking of the lighting is not possible (dynamic or/and big worlds ...). The aim of the sample is to demonstates the visual enhancement that normal maps brings, but speed-wise it can certainly be improved :).

This sample requires a recent DirectX 9.0c runtime and a Shader 3.0 capable GPU.

Executable can be found here : www.vizerie3d.net