Renderer · interface
FieldMarch
How the march is shaped.
Explained in Hello world.
interface FieldMarchimport type { FieldMarch } from '@driftengine/core';Properties
| Name | Type | Description |
|---|---|---|
stepsreadonly | number | The most samples one ray may take. A converging march uses a fraction of this. |
reachMreadonly | number | How far the ray travels in world metres before it gives up. |
coneAnglereadonly | number | Half-angle of the cone, in radians. Zero is a pencil ray.MoreA rough surface reflects a lobe rather than a ray, and a cone is how a distance field traces one: the radius grows with the distance travelled and a hit is where the field falls below that rather than below a constant. The blur is then correct by construction — a wide cone stops further from a surface, so what it gathers is a broader patch of it — instead of being a filter applied to a sharp answer afterwards. |
hitEpsilonMreadonly | number | How close to a surface counts as arriving, in metres, before the cone's own radius. |