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): booleanimport { traceScreen } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
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 |
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.