Renderer · interface
GlobalFieldCascade
One level of the clipmap: a grid the composer fills and sampleGlobalField reads.
Explained in Hello world.
interface GlobalFieldCascadeimport type { GlobalFieldCascade } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
fieldreadonly | Float32Array | |
albedoreadonly | Float32Array | The colour of whatever surface won the union at each sample, three floats a sample.MoreA union loses which instance won, and a ray that lands on a wall needs to know what colour
it is. White where no instance reached, rather than black: the colour of a sample no ray can hit is never read, and black would turn a read that did happen into light quietly vanishing instead of a picture that is obviously wrong. |
dimsreadonly | readonly [number, number, number] | |
boundsreadonly | Float32Array | Where this cascade stands, written by composeGlobalField. Six floats. |
step | number | Metres between samples, the same on all three axes. Written by composeGlobalField. |