Renderer · function

visibleProbes

The eight probes around a point, weighted by what each of them can actually see.

Explained in Hello world.

function visibleProbes(grid: ProbeGrid, visibility: ProbeVisibility | null, x: number, y: number, z: number, out: ProbeBlend): ProbeBlend
import { visibleProbes } from '@driftengine/core';

Parameters

ParameterTypeDescription
gridProbeGrid
visibilityProbeVisibility | null
xnumber
ynumber
znumber
outProbeBlend

In depth

With visibility null this is nearestProbes and nothing else — see the module header for why that matters. With one, each corner's trilinear weight is multiplied by its visibility, the result is crushed and the eight are renormalised so they still sum to one. Renormalising is what keeps the blend from losing energy, which is the property the white furnace in Task 10 rests on: a solution that quietly drops a share of its probes darkens every bounce.

A point every probe is blind to still gets an answer, because this is the last level of the chain and there is nothing behind it. When every weight crushes to zero — a point inside a solid, or a sealed void with a probe on each side of a wall — the nearest probe by distance takes the whole weight. That is the coarse answer this level exists to always have.