Renderer · function

traceReflection

Trace a reflection down the chain, or down its first level alone.

Explained in Hello world.

function traceReflection(surface: ReflectiveSample, resources: GiResources, options: ReflectionOptions, out: IndirectResult): IndirectResult
import { traceReflection } from '@driftengine/core';

Parameters

ParameterTypeDescription
surfaceReflectiveSample
resourcesGiResources
optionsReflectionOptions
outIndirectResult

In depth

With fallback off, only the screen answers and a miss stays a miss — which is what screenSpaceReflection.ts has always done and what keeps every published scene where it is. With it on, a ray leaving the frame continues into the world's distance field and, behind that, the probes: a mirror at the edge of the picture reflects the world rather than fading to a matte surface as the camera turns.