BasicShadowFilter

Last modified: Feb 9, 2026

A shadow filtering function performing basic filtering. This is in fact an unfiltered version of the shadow map with a binary [0,1] result.

ParameterTypeDefault Value
inputsObject
inputs.depthTextureDepthTexture
inputs.shadowCoordNode<vec3>

Returns

Node<float>

PCFShadowFilter

A shadow filtering function performing PCF filtering with Vogel disk sampling and IGN.

Uses 5 samples distributed via Vogel disk pattern, rotated per-pixel using Interleaved Gradient Noise (IGN) to break up banding artifacts. Combined with hardware PCF (4-tap filtering per sample), this effectively provides 20 filtered taps with better distribution.

ParameterTypeDefault Value
inputsObject
inputs.depthTextureDepthTexture
inputs.shadowCoordNode<vec3>
inputs.shadowLightShadow

Returns

Node<float>

PCFSoftShadowFilter

A shadow filtering function performing PCF soft filtering.

ParameterTypeDefault Value
inputsObject
inputs.depthTextureDepthTexture
inputs.shadowCoordNode<vec3>
inputs.shadowLightShadow

Returns

Node<float>

VSMShadowFilter

A shadow filtering function performing VSM filtering.

ParameterTypeDefault Value
inputsObject
inputs.depthTextureDepthTexture
inputs.shadowCoordNode<vec3>

Returns

Node<float>

getShadowMaterial

Retrieves or creates a shadow material for the given light source.

This function checks if a shadow material already exists for the provided light. If not, it creates a new NodeMaterial configured for shadow rendering and stores it in the shadowMaterialLib for future use.

ParameterTypeDefault Value
lightLight

Returns

NodeMaterial

disposeShadowMaterial

Disposes the shadow material for the given light source.

ParameterTypeDefault Value
lightLight

Returns

any