Cheap Global Illumination – Half Lambert
Global Illumination is expensive if done in real-time and still no perfect solution exits, which lead us to use offline solutions using ray tracers ,etc. They take a lot of time to compute offline data to be used later during rendering.
If we don’t use any global illumination solution our scenes tend to become dark and many areas stay close to black. To solve the problem often people use Ambient Light which creates a Flat look and washes of the details of the mesh.
One cheap solution to the problem is Wrap Lighting. One of the way to do wrap lighting is Half Lambert model used by valve in Source Engine.
Normal Lambert model used saturated dot product which clamps -1,1 ranged result to 0,1 , but in Half Lambert model we first scale the dot product by 1/2 , add 1/2 to it and then multiply the result by 2. What it does it makes the result of dot product lie between 0 , 1 and there’s no more need to clamp it which in turns gives us much better fall off than nor Lambert model.