Renderer · const
IRRADIANCE_EDGE
The irradiance image's edge, and why the diffuse term is a level of the same chain.
Explained in Hello world.
const IRRADIANCE_EDGE = 8import { IRRADIANCE_EDGE } from '@driftengine/core';In depth
Eight, which is what a probe's diffuse light actually needs. A cosine convolution removes everything above the second band, so the image it produces has no detail an eighth of a sphere across to lose — the size irradiance probes are conventionally stored at, arrived at from the same place. It replaces nine spherical-harmonic coefficients, and 64 octahedral texels carry at least what nine coefficients did.
What this buys is the last texture unit. A second array would be a second sampler, and
WebGL2 guarantees sixteen units of which fifteen are spent. Folding the diffuse term into a
level of the radiance chain is what REFRACT_SCENE_TEXTURE_UNIT's comment asks the next
sampler to do, and it leaves unit 15 free.