contactShadows.renderFeature
This package holds more than this page lists. See all of its files in its world.
README.md
contactShadows
The render passes behind the ContactShadows component and the module. Its
settings (strength, length, steps, bias, thickness, followSun,
lightDirection, localLights, maxTracedLights) are its fields, so it can
stand as a placed member with every value stated.
The sun, at the depth seam before anything shades: a jittered depth-buffer
march from each surface toward the sun, its normal read off the depth, writes
the share of the sun's light it finds taken; a depth-aware blur smooths it; a
fragment pass composes it into the scene's sun occlusion channel
(@scene.sunOcclusion) with the union blend. The sun's term alone takes it,
so the sky, the probes, the emissive surfaces and the other lights keep their
light, and it stands with a participating medium's share as a + b - ab.
With localLights, after lighting: a march toward each of the
maxTracedLights point, spot and distant lights putting the most light on the
pixel, each result weighted by the share of the pixel's light that light
supplied, 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.
Those lights arrive through contact_lights, packed by the module once a
frame, so the traces follow lights that move.
The forward view-projection is the frame's own, so captures and RTT cameras project through their own matrix.