# Why Diffuse Light use max(N · H, 0) instead of just letting it be negative?

In Cg tuts, Diffuse Section

Surfaces that face away from the light will produce negative dot-product values, so the max(N · L, 0) in the equation ensures that these surfaces show no diffuse lighting.

My question is why not just leave it be negative? IMO, both the negative and zero will make the color be black.

• If your application does indeed not rely on this value not being negative (only a single light source, just rendering straight to a color target in a way that will lead to the output being clamped to black anyways, etc.) then, by all means, go ahead and skip the max() if it makes you feel better. But do so, knowing that this will merely produce a result indistinguishable from the correct result in the most narrow circumstances and incorrect results in any other case. Meanwhile, any useful explanation of how shading works will continue to present the formula that is correct in general… 😉 – Michael Kenzel Jan 7 at 10:00
Because negative shading values are undefined and don't play well with tonemapping. It is preferable to use values in $$[0,1]$$ for low-dynamic-range or $$[0,+\infty)$$ for high-dynamic-range images.
$$N \cdot L < 0$$ implies that the light is directed in the direction opposite the normal to the visible surface of the polygon. This means that the light is coming from behind and striking the back face of the polygon. In the analogous situation in real life, light striking one face of an opaque surface does not affect the illumination of a second face. Shining light on the back of a book (or other opaque object) does make the front of the book darker (that is it does not apply negative lighting): it simply has no effect on the front face of the book. This is the reason for the max() function.
Applying negative illumination to a surface where $$N \cdot L < 0$$ doesn't make sense physically. In geometric optics with incoherent light sources there is no such thing as negative illumination.