Renderer · interface

GiResources

Everything the three levels need, gathered so a per-ray call takes one object.

Explained in Hello world.

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

Properties

NameTypeDescription
eyereadonlyReadonlyVec3
projectreadonly(x: number, y: number, z: number, uv: Float32Array) => boolean
sceneDistancereadonly(u: number, v: number) => numberHow far the eye is from whatever the frame drew, and Infinity where it drew nothing.
screenRadiancereadonly(u: number, v: number, out: Float32Array) => voidThe radiance the frame holds at a screen position.
fieldreadonlyGlobalField
fieldRadiancereadonly(x: number, y: number, z: number, out: Float32Array) => voidThe radiance at a world point the field trace arrived at.
gridreadonlyProbeGrid
visibilityreadonlyProbeVisibility | nullNull is the off switch, and it lands on the grid's own blend. See probeVolume.ts.
probeValuesreadonlyFloat32ArrayprobeChannels floats a probe, layer-major.
probeChannelsreadonlynumber
screenMarchreadonlyoptionalScreenSpaceMarch
fieldMarchreadonlyoptionalFieldMarch