indirect-lighting
Installation
SKILL.md
Indirect lighting
Target: Three.js 0.187.0, WebGPU renderer (three/webgpu) and TSL node materials (three/tsl); WebGPU only, no WebGL fallback, no GLSL strings.
Direct light is the lighting skill. This one is what happens after the first bounce: the glow
of a sunlit floor on a ceiling, the colour of a red wall on a white one, the dimness of a corridor
compared to the hall it leaves. Two r187 tools do it, both GPU-resident and both baked, so they
cost almost nothing per frame.
Two tools
| Tool | What it is | Use for |
|---|---|---|
LightProbeGrid |
a Light holding a 3D grid of L2 spherical-harmonic probes in one 3D texture; added to the scene it lights every lit node material by position |
ambient that changes room to room; moving things (a character, vehicles, instanced facades) lit by the space; the fast default |
LightMapper |
bakes an irradiance function into a uv1 light map, rasterising each mesh in UV space with jittered samples |
static architecture that needs crisp bounce detail and the cheapest possible runtime |
The pairing for a hall with a walking character: the grid in the scene for the character and the instanced things, a light map baked from that same grid for the static walls and floor, and the static materials told not to read the grid as well (below), so nothing is counted twice.