04-10-2011, 11:17 AM
This is a test rendering of HDR rendering techniques in Unity,
Currently implemented:
64Fp render texture;
Tonemap function with Gamma control and night blue shift;
Automatic exposure control;
Floating point texture blending for accurate motion blur and Dof (mainly for multi-pass accumulation rendering, so high quality screen shot is possible);
Image based lighting and correct cubemap bilinear filtering done in the fragment shader(Currently slower than hardware filtering);
Camera transformation jittering, this is for anti-alising when generate multipass accumulation renderings. The above shot uses a 32x anti-alising transform.
To do:
Hdr cubemap, which is partially working atm( by packing Hdr into Ldr format);
Faster cube map filtering, this may require Dx10 support in unity in the future;
Some code optimization.
Feel free to fire any questions
Download the demo for windows here: http://www.mediafire.com/?fm9wqfidudgsonm
Controls: arrows to move around and WASD to rotate camera, QE for roll and RF for moving vertically.
The Toggle Accumulate Blur button forces on a 32X accumulate anti aliasing + motion blur( for screen capture purpose).
Move around and see the different exposure when looking at the dark/bright part of the scene.
Note: You need a shader model 3.0 ready GPU to run the demo.
Autore: http://forum.unity3d.com/threads/84755-H...-Unity-WIP