Sunday, October 17, 2010

Something like HDR

This is not real HDR because input scene is stored in a PF_FLOAT_A8R8G8B8 buffer not a PF_FLOAT16_RGBA. With my deferred shading system it should be possible because the first MRT buffer is a floating point one (storing diffuse in RGB and specular in A) and the light pass exceed 1.0f - but if the HDR compositor tries to use a floating buffer as input it shows artifacts and doesn't render the sky

With hdrExposure set to 1.5f.







With hdrExposure set to 2.0f:































Friday, October 15, 2010

Deferred Rendering

In the last few days Ainur has got an experimental Deferred Rendering system, based on the Ogre's sample. I was not sure about this change, but on the other hand deferred lighting scales much better with a high number of lights (which can be helpful with certain games) and some effects like SSAO, SSGI and global fog requires a screen quad which should be created for each post-processing effect in a forward rendering system.

Crytek gave its Sponza palace model for free, which was converted by a yet to be release Ainur utility from the Wavefrom format to the native Ogre mesh format.

Sponza, is a nice model to test global illumination and ambient occlusion, so it's now the default scene loaded by my test application.

Sponza atrium, red and green curtains with thorns in the middle

Red fabric

A wall in the Sponza palace

Wall lit by sunset

Atrium walls at night

Atrium at night
The Deferred Rendering system's architecture which was "ripped" from Ogre's samples provides the SSAO post-processing effect but it shows some glitches, look at the screenshots:

Lion with SSAO
Here some screenshot to see the difference:


Even with the SSAO effect, the sceen doesn't look very nice. To make it better, the fragment program that outputs to the MRT0 buffer now takes the diffuse texture alpha channel for specularity.