Renderer · function

traceScreen

Trace an indirect ray against the frame the renderer has already drawn.

Explained in Hello world.

function traceScreen(point: ReadonlyVec3, normal: ReadonlyVec3, direction: ReadonlyVec3, eye: ReadonlyVec3, march: ScreenSpaceMarch, project: (x: number, y: number, z: number, uv: Float32Array) => boolean, sceneDistance: (u: number, v: number) => number, out: ScreenSpaceHit): boolean
import { traceScreen } from '@driftengine/core';

Parameters

ParameterTypeDescription
pointReadonlyVec3
normalReadonlyVec3
directionReadonlyVec3
eyeReadonlyVec3
marchScreenSpaceMarch
project(x: number, y: number, z: number, uv: Float32Array) => boolean
sceneDistance(u: number, v: number) => number
outScreenSpaceHit

In depth

Returns whether the screen could answer. A false here is the chain's instruction to keep going, not a statement that there is nothing there: the ray may have left the frame, gone behind something, or simply run out of reach, and in every one of those cases the world-space field has the next word. That is what makes this an accelerator rather than an answer, and it is the distinction the refusal in ROADMAP.md rests on.