Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

contactShadows

The render passes behind the ContactShadows component and the module.

Two compute passes after lighting: a jittered depth-buffer march toward the lights reaching the pixel, then a depth-aware blur that composites the result scaled by how lit the pixel already is, so contact shadows and shadow-map shadows do not stack.

The march runs once for the sun and once for each of the maxTracedLights lights putting the most light on that pixel, and each result is weighted by the share of the pixel's light that light supplied.

Parameters arrive through the contact_params buffer and the lights through contact_lights, both packed by the module; the module is refreshed on the frame's first view, so the traces follow lights that move. The forward view-projection is derived from the inverse the frame provides, so captures and RTT cameras project through their own matrix.