Texel A field guide to 3D techniques

Compare techniques

Put 2 to 4 rendering techniques side by side across Execution Fidelity, normalized NVIDIA T4/L4/A100 GPU weights, 8-engine support, pipeline I/O, documented field marks, and synchronized WebGL2 shader previews.

Canonical matchups

Percentage-Closer Soft ShadowsVariance Shadow MapsCascaded Shadow MapsSDF Soft Shadows
Attribute
Specimen render of Percentage-Closer Soft Shadows
Shadows & AO Percentage-Closer Soft Shadows Fernando, 2005
Specimen render of Variance Shadow Maps
Shadows & AO Variance Shadow Maps Donnelly & Lauritzen, 2006
Specimen render of Cascaded Shadow Maps
Shadows & AO Cascaded Shadow Maps Zhang et al., 2006
Specimen render of SDF Soft Shadows
Shadows & AO SDF Soft Shadows Quilez
Summary

Estimates penumbra width per pixel from a blocker search in the shadow map, then runs a PCF kernel of that size, so shadows sharpen near contact and blur with distance.

Stores depth and depth squared per texel so the shadow map can be blurred and mipmapped, then bounds visibility with Chebyshev's inequality instead of a binary test.

Splits the camera frustum into depth slices and gives each slice its own shadow map, so near surfaces get high texel density without exploding total resolution.

While sphere-tracing toward the light, the smallest ratio of distance-to-surface over travelled distance approximates the light's unoccluded cone, giving cheap penumbrae for free.

Stage & speedVisibility · Real-timeVisibility · Real-timeVisibility · Real-timeVisibility · Real-time
Execution fidelityVisual diagramVisual diagramVisual diagramFaithful pass
Measured GPU weight (T4 1080p)Visual diagram (50.1× proxy — excluded from shader ranking)Visual diagram (12.7× proxy — excluded from shader ranking)Visual diagram (65.4× proxy — excluded from shader ranking)
24.8× heavy 0.82 ms p50 L4 22.4× · A100 14.7×
Estimated costMedium (1–4 ms)

Dozens of shadow-map taps per pixel; usually the most expensive shadow-map filter in common use.

Cheap (≪1 ms)

Needs a two-channel float or half-float target and a blur pass; sampling is a single filtered fetch.

Medium (1–4 ms)

Each cascade re-renders casters, so draw cost is roughly cascade count times the caster pass, mitigated by culling per cascade and updating far cascades less often.

Medium (1–4 ms)

Tens of SDF evaluations per pixel; cost depends on the complexity of the field function.

When to choose

Choose it for contact-hardening soft shadows from a single shadow map, typically on the sun or a few key lights.

Choose it when you need cheap, large, antialiased soft shadows from a prefilterable map and can tolerate tuning.

Choose it for sun or moon light in open scenes with a long view distance.

Choose it when the scene is already an SDF (raymarched demos, shader-art, Dreams-style content, or a baked or voxelised distance field) and you want cheap soft shadows with no shadow map.

Inputs
depth visibility-mask
depth
mesh depth
sdf
Outputs
visibility-mask
visibility-mask
visibility-mask
visibility-mask
Field marks (failure modes)
  • Assumes one planar blocker depth, so penumbrae are wrong with multiple occluders at different depths
  • Noise or banding when tap counts are low
  • Blocker search radius can miss thin distant occluders
  • Light bleeding where occluders overlap at different depths
  • Precision loss with 16-bit moments on large depth ranges
  • Higher memory per cascade than a plain depth map
  • Visible seams or resolution jumps at cascade borders
  • Shadow swimming and shimmering when the fit is not stabilised
  • Wasted resolution in the nearest cascade for oblique light directions
  • Penumbra is an approximation of one light cone and is not physically accurate for large lights
  • Banding or light leaks if the step size is clamped too low or too high
  • Inexact (Lipschitz-violating) SDFs from domain warping give artifacts
Engine & API support
three.js
Official add-onexamples/webgl_shadowmap_pcss.html patches ShaderChunk.shadowmap_pars_fragment with PCSS
Built inrenderer.shadowMap.type = THREE.VSMShadowMap
Official add-onimport { CSM } from 'three/addons/csm/CSM.js' (WebGPU: CSMShadowNode)
None found
Babylon.js
Built inshadowGenerator.useContactHardeningShadow = true (PCSS)
None found
Built innew BABYLON.CascadedShadowGenerator(1024, directionalLight); csm.numCascades = 4
None found
Godot
Built inLight3D.light_size (omni/spot) or Light3D.light_angular_distance (directional)
None found
Built inDirectionalLight3D.directional_shadow_mode = DirectionalLight3D.SHADOW_PARALLEL_4_SPLITS
None found
Unity
Built inHDRP Asset > Lighting > Shadows > Filtering Quality = High (PCSS)
None found
Built inURP Asset > Shadows > Cascade Count; HDRP Volume > Shadows > Cascade Count
None found
Unreal
Built inVirtual Shadow Maps > Shadow Map Ray Tracing (SMRT) evaluates contact-hardening variable-penumbra soft shadows
None found
Built inDirectional Light > Cascaded Shadow Maps category (Dynamic Shadow Distance, Num Dynamic Shadow Cascades)
Built inProject Settings > Rendering > Generate Mesh Distance Fields; Light > Mobility = Movable/Stationary > Distance Field Shadows
Blender
None found
None found
None found
None found
WebGPU
None found
None found
None found
None found
Metal
None found
None found
None found
None found
Pipeline compatibility detected: Variance Shadow Maps → Percentage-Closer Soft Shadows (visibility-mask) · Cascaded Shadow Maps → Percentage-Closer Soft Shadows (visibility-mask) · SDF Soft Shadows → Percentage-Closer Soft Shadows (visibility-mask)

Machine-readable comparison dataset: /api/v1/compare-index.json · Looking for what broke a render? Try Diagnose a rendering artifact.