New rendering features !

I added Gamma Correction, bump/normal mapping, and Depth of Field.

I also fixed few bugs.

ScreenShots of Gamma Correction


No correction


Gamma corrected

It’s brighter where it should be, and still dark where it should be too.

The picture was took from the ATI’s sRGB sample.

ScreenShots of Normal Mapping


The left sphere is the high poly one (40K faces). The right is the low poly version (960 faces) with the normal map applied.
The normal map was created with our 3D Studio Max Bump-o-matic plugin.


Wire version of the first screenshot.


Rendering of the normals.

ScreenShots of Depth of Field


The white AABBs symbolize the Plane in Focus. Check their intersection with the scene to get a better idea of their position.

More about depth-of-field:

I read many things about Depth of Field, the article in GPU Gems for instance, saw many formula without really knowing how to practically implement them.

So I came out with an in-house one, really simple:
 Df = DP * abs(PosZPiF) / PosZ.
  DP is the Depth of Field Power. 0 to disable it, 1 for standard result, >1 to get something really blurry.
  PosZ is the position in camera space of the pixel to compute.
  PiF is the Plane in Focus position in camera space.
  Df is the result, I clamp it to [0,1] and use it in the lerp from the accumulation buffer and the blurred one during the ToneMapping.