Renderer · interface

ProbeVisibility

What each probe could see, as one octahedral map of depth moments per probe.

Explained in Hello world.

interface ProbeVisibility
import type { ProbeVisibility } from '@driftengine/core';

In depth

Two moments and not one distance. A single distance gives a binary answer — in front of the wall or behind it — and a binary answer aliases along every edge in the scene, because the probe that can see a point and the probe that cannot are adjacent. The mean and the mean of squares give a variance, and a Chebyshev bound on that variance is a soft weight: confident where the geometry is flat, uncertain where it is not, which is exactly where a hard answer would be wrong. It is the same arithmetic a variance shadow map uses, for the same reason.

Octahedral rather than a cube, matching EnvProbeArray: one layer a probe, no faces to seam, and no sampler per probe. octInsetUv is the mapping, so a direction lands in the same texel here as it does in the radiance map.

Properties

NameTypeDescription
momentsreadonlyFloat32ArrayTwo floats a texel: mean distance, then mean of squares. One map a probe, layer-major.
edgereadonlynumberTexels a side, the outer ring being the gutter octInsetUv insets past.
layersreadonlynumber