Builtin Library
- ..
- README.md940 B
- preview.png3.5 KB
- properties.yaml398 B
- shader.wgsl658 B
README.md
sssMask
Fills a marked mesh's silhouette with the scattering it was authored with: the tint in RGB, and in alpha the world-space distance light travels beneath the surface before it leaves, over [0, 1]. Alpha above zero is what marks a pixel as scattering at all, so a target cleared to zero reads as "no subsurface here".
A geometry pass draws through a material pipeline built for the frame's own colour format, which is why the mask is 8-bit rather than float. One group holds one radius, so that quantisation lands on the authored value rather than varying across a surface.
One material carries one group's values and sssDiffusion.renderFeature issues
one draw per group, so meshes scattering differently keep their own numbers.
| property | meaning |
|---|---|
scatter_color | The tint, and per channel how far that channel travels. |
scatter_radius | The distance light travels beneath the surface, in world units. |