Renderer · interface
GpuDrivenShadowOptions
What the pass is told once, at construction, about the map it renders.
Explained in Hello world.
interface GpuDrivenShadowOptionsimport type { GpuDrivenShadowOptions } from '@driftengine/core';In depth
Its own defaults rather than a RenderQuality, because a contributed pass is handed a
device and not the frame's settings — PassDevice is the whole of what it gets. The numbers are
the forward path's, taken from DEFAULT_RENDER_QUALITY so the two pipelines fade a shadow out
over the same distance and give up on the same low sun rather than nearly.
Properties
| Name | Type | Description |
|---|---|---|
mapSizereadonlyoptional | number | Texels a side. 2048 is directionalShadowMapSize, and a draft can afford it. |
maxDistancereadonlyoptional | number | Metres a shadow travels along the ground before it has dissolved. |
maxSlopereadonlyoptional | number | The steepest sun that still casts, as horizontal metres per vertical one. |
tapsreadonlyoptional | number | Taps of the twelve the filter may take. Fewer is cheaper and harder-edged. |
presentDepthreadonlyoptional | boolean | Hand the frame this pass's depth as well as its colour, so both pipelines share one.MoreOff by default, because every consumer before 2026-09-18 drew nothing but this pipeline. For them the frame's depth is something nothing reads and a write into it is a change to a frame they did not ask to change; the three GPU-driven rigs leave it alone, which is what keeps them 0 of 921,600 and keeps them the control. On, it is what lets a forward-path mesh stand behind GPU-driven geometry. Without it the
two have no depth relationship at all and no ordering of them produces one — which is the gap
the voxel sandbox's port found, where mobs, particles, falling blocks and the block highlight
all draw on the forward path. It costs one more sampled texture in the blit and a fragment depth write over the pixels this pipeline covered. A pixel it did not cover is discarded before either, so the sky keeps the depth the frame already had. |
followRadiusreadonlyoptional | number | Metres around the eye the map covers once the scene is larger than that. See fitShadow.MoreUnset, the map is fitted to the whole scene, as it always was — right for rigs a few metres across and the fit all three were photographed with. A world sets it: the voxel sandbox's port at radius 14 is a sphere hundreds of metres across, over which one map has texels a quarter of a metre wide. Past the radius the map follows the eye, snapped to whole texels, and reaches toward the sun as far as the scene does. |
glassreadonlyoptional | GlassShadows | What the sun keeps through glass: RenderQualityOptions.glassShadows, which a contributed pass
is not handed and so takes here. 'full' by default, as there; 'half' halves the tint and
'off' draws a glass material's shadow as nothing, which is what it cast before. |