home/ atoms/ penumbra-colorization

Colorizing the shadow penumbra with warm tones rather than grey makes rendered images more cinematic

In physically-naive rendering, shadows fade from key-light color to black. In film and in IQ’s practice, the penumbra zone is tinted warm (orange-red) rather than grey, because the eye/film perceives penumbras as slightly red-orange in reality. Practically: instead of multiplying diffuse by a scalar shadow factor, multiply by a vector that ramps differently in R, G, B channels — red decays more slowly than green/blue through the transition, creating an orange penumbra. Mixing linear and quadratic decay per channel controls the hue.

Examples

vec3 shd = vec3(sha, sha*sha, sha*sha); — red = linear, green/blue = quadratic; transition zone appears orange.

Assessment

A student replaces the vec3 shadow multiply with a scalar and reports the scene looks flat. Explain exactly what the colorized penumbra adds and which specific areas change most.

“red channel, but it rams down much quicker in the blues and greens, so the red stays for a longer time in that transition, and then eventually it vanishes”
corpus · inigo-quilez-live-coding-happy-jumping-video · chunk 27