home/ atoms/ occlusion-colorization-power-secondary-bounce

Raising per-surface occlusion to a power of the surface color simulates colorized secondary light bounces

When ambient occlusion darkens a concave area, it produces a neutral grey shadow. In reality the occluded area still receives some indirect light that has bounced off nearby colored surfaces — e.g. a mouth interior receives reddish light bounced from flesh. Raising the occlusion signal to a power of the local surface color achieves this: for white surfaces (1.0) the power has no effect; for colored surfaces (<1) the power darkens darks further while leaving whites unchanged. Since neighboring surfaces share a similar hue, using the surface color as the power exponent is a plausible statistical approximation of multi-bounce interreflection. The technique was widely used in film production for vegetation and character skin.

Examples

col *= pow(occ, vec3(1.0, 0.8, 0.7)); // darks gain warm-red tint; whites unchanged

Assessment

A shader applies pow(occ, vec3(1,1,1)) and then pow(occ, vec3(2,0.5,0.5)). Describe the color of occluded shadows in each case and explain the difference.

“take occlusion and you write it to a power, you are sort of introducing secondary bounces, in a statistical way”
corpus · inigo-quilez-live-coding-happy-jumping-video · chunk 28