Optimized lighting of underwater terrain

The water light filter is now applied first to avoid computing
terrain shadows when no light passes through the water layer.