Documentation / @ripl/3d / SurfaceIllumination
Interface: SurfaceIllumination ​
Defined in: 3d/src/core/shading.ts:125
The light arriving at a surface, split so the diffuse term stays a plain multiplier.
Keeping it a multiplier is what lets composeSurfaceColor reduce to the original round(channel * brightness) expression when nothing adds to it, so a scene using neither specular nor emissive renders byte-identically to the single-light model this replaced.
Properties ​
| Property | Type | Description | Defined in |
|---|---|---|---|
additive | ColorUnitRGB | Per-channel light added on top, carrying the specular and emissive terms. | 3d/src/core/shading.ts:129 |
diffuse | ColorUnitRGB | Per-channel multiplier applied to the surface's own colour. | 3d/src/core/shading.ts:127 |