THREE.JS / FOUNDATIONS 117

Find the shadow budget.

Shadow quality is a scene-level tradeoff: map resolution, filter cost, caster count, and update policy all change the work the renderer owns. This lab turns those choices into a repeatable local measurement.

Initializing -

Preparing the native shadow filter and renderer counters.

filter
-
map
-
box casters
-
updates
-
target
-
compile
-
first submit
-
draw calls
-
Shadow budget matrixpreparing

Structural changes reload the renderer so map and filter ownership stay explicit.

Measured renderer budgetwaiting
sample frames
-
submit avg
-
submit p95
-
triangles
-
textures
-
render targets
-
memory total
-
shadow pass
-

Run the fixed sample after the first shadow map is ready. Values are local renderer counters and CPU submission measurements.

What this teachesquality x work

A larger map spreads the same shadow camera coverage across more texels; more casters increase shadow-pass work; VSM adds blur targets; and a static LightShadow can avoid repeating that pass when the scene is truly static.

The frame metric is CPU-side render submission time, not a universal GPU time. Compare configurations on the same browser session; press R to reset.

Inspect the shadow map next ->
LAB 117 / SHADOW BUDGET