Thin-Wall Scattering
Thin-wall scattering divides transmitted light between specular transmission and diffuse scattering at a surface. luma.gl implements an experimental thin-wall profile in its shared PBR shaders on WebGL2 and WebGPU.
Configuration​
Enable USE_MATERIAL_EXTENSIONS: true and HAS_MATERIAL_SCATTER: true on a compatible model.
The scattering-strength texture reuses the linear alpha channel of pbr_diffuseTransmissionSampler;
its sampling requires HAS_DIFFUSETRANSMISSIONMAP: true and diffuseTransmissionMapEnabled: true. The scattering-color texture uses the
existing sRGB pbr_multiscatterColorSampler binding. Source conversion sets the associated
uniforms, texture flags, and defines together.
Parameters​
| Parameter | Default | Description |
|---|---|---|
transmissionFactor | 0 | Energy available for transmission. |
scatterStrengthFactor | 0 | Fraction of transmission assigned to diffuse scattering, from zero to one. |
multiscatterColorFactor | [0, 0, 0] | Linear scattering color; set a nonblack color explicitly for native materials. |
scatterAnisotropy | 0 | Directional preference; use values strictly between minus one and one. |
The scattered energy exits through the forward and backward hemispheres in proportions
(1 + g) / 2 and (1 - g) / 2, where g is the scattering anisotropy. Scattering color is
independent of base color.
Remarks​
- This profile requires zero volume thickness.
- luma.gl supports the thin-wall profile of the draft
KHR_materials_scatterextension. Strict loading rejects assets that require the extension.