Renderer · interface

SpatialOptions

Explained in Hello world.

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

Properties

NameTypeDescription
stepreadonlynumberMultiplier on the kernel's spacing, in pixels. See filterStepFor for what chooses it.
More

A step rather than a radius, which is the à-trous arrangement: the same five-tap kernel is run with its taps further apart, so a wide filter costs what a narrow one costs. A radius would cost its own square.

depthTolerancereadonlyoptionalnumberHow far apart in depth two pixels may be and still share light, as a fraction of their depth.
More

Relative rather than absolute, because a centimetre is a discontinuity across a desk and nothing at all across a valley. A tenth is wide enough to keep a surface tilted away from the camera together and narrow enough to find the edge of the thing standing on it.

normalSharpnessreadonlyoptionalnumberThe exponent on max(dot(n, n'), 0). Higher keeps the filter inside one face.