Renderer · function

spatialDenoise

One separable, edge-stopping pass over a frame.

Explained in Hello world.

function spatialDenoise(frame: DenoiseFrame, options: SpatialOptions, out: Float32Array): void
import { spatialDenoise } from '@driftengine/core';

Parameters

ParameterTypeDescription
frameDenoiseFrame
optionsSpatialOptions
outFloat32Array

In depth

The weights are renormalised by their own sum, and that is the line this module exists to get right. A tap rejected for being on the other side of an edge has to be removed from the average, not set to zero and left in the denominator — the second darkens every silhouette by however much of its kernel fell off the surface, which looks like contact shadowing and is the filter eating light. energy.test.ts makes the same argument about the probe blend one level up.