mrdoob/three.js · error · Error
THREE.WebGPURenderer: Shadow map type not supported yet.
Error message
THREE.WebGPURenderer: Shadow map type not supported yet.
What it means
Thrown by ShadowNode.setup() when no shadow filter function can be resolved. The filter comes from `shadow.filterNode`, else `getShadowFilterFn(renderer.shadowMap.type)`. The built-in filter library is `[BasicShadowFilter, PCFShadowFilter, null /*PCFSoftShadowMap removed*/, VSMShadowFilter]`, so PCFSoftShadowMap (value 2) maps to null. The error fires when shadowMap.type is PCFSoftShadowMap and no custom filterNode is set.
Source
Thrown at src/nodes/lighting/ShadowNode.js:544
const highpShadowModelMatrix = uniform( 'mat4' ).onObjectUpdate( ( { object }, self ) => {
return self.value.multiplyMatrices( shadowMatrix.value, object.matrixWorld );
} );
shadowPosition = highpShadowModelMatrix.mul( positionLocal ).add( shadowMatrix.mul( vec4( shadowNormalBias, 0 ) ) );
}
const shadowCoord = this.setupShadowCoord( builder, shadowPosition );
//
const filterFn = shadow.filterNode || this.getShadowFilterFn( renderer.shadowMap.type ) || null;
if ( filterFn === null ) {
throw new Error( 'THREE.WebGPURenderer: Shadow map type not supported yet.' );
}
const shadowDepthTexture = ( shadowMapType === VSMShadowMap && shadow.isPointLightShadow !== true ) ? this.vsmShadowMapHorizontal.texture : depthTexture;
const shadowNode = this.setupShadowFilter( builder, { filterFn, shadowTexture: shadowMap.texture, depthTexture: shadowDepthTexture, shadowCoord, shadow, depthLayer: this.depthLayer } );
let shadowColor;
if ( renderer.shadowMap.transmitted === true ) {
if ( shadowMap.texture.isCubeTexture ) {
// For cube shadow maps (point lights), use cubeTexture with vec3 coordinates
shadowColor = cubeTexture( shadowMap.texture, shadowCoord.xyz );
} else {
View on GitHub (pinned to da05705fa3)
Solutions
- Use a supported shadow map type: BasicShadowMap, PCFShadowMap, or VSMShadowMap.
- If you need PCFSoftShadowMap behavior, supply a custom `shadow.filterNode` filtering function.
- Set `renderer.shadowMap.type = PCFShadowMap` (the renderer already warns and falls back, but only at render time — set it explicitly to avoid the throw in the node path).
Example fix
// before renderer.shadowMap.type = PCFSoftShadowMap; // after renderer.shadowMap.type = PCFShadowMap;
Defensive patterns
Strategy: validation
Validate before calling
import { BasicShadowMap, PCFShadowMap, VSMShadowMap } from 'three';
const SUPPORTED_SHADOW_TYPES = new Set( [ BasicShadowMap, PCFShadowMap, VSMShadowMap ] );
function assertShadowType( type ) {
if ( ! SUPPORTED_SHADOW_TYPES.has( type ) ) throw new Error( `Unsupported shadow map type: ${ type }` );
}
assertShadowType( renderer.shadowMap.type ); Type guard
const isSupportedShadowType = ( t ) => SUPPORTED_SHADOW_TYPES.has( t );
Prevention
- Avoid PCFSoftShadowMap on the node/WebGPU renderer — it was removed.
- Set renderer.shadowMap.type to PCFShadowMap, BasicShadowMap, or VSMShadowMap.
- If you need custom filtering, provide shadow.filterNode.
When it happens
Trigger: Setting `renderer.shadowMap.type = PCFSoftShadowMap` (deprecated/removed in this version) without providing a per-shadow `filterNode`; using a shadowMap.type constant value outside 0-3; clearing shadowMap.type to an unsupported value.
Common situations: Upgrading Three.js where PCFSoftShadowMap was removed from the WebGPU/node renderer; copy-pasting shadow config from an older project; numeric type value corruption.
Related errors
- THREE.PassNode: Depth texture is not available for this pass
- THREE.ReflectorNode: Depth node can only be requested when t
- THREE.BatchedMesh: Maximum item count reached.
- THREE.WebGPUUtils: Unsupported output buffer type.
AI-assisted analysis of mrdoob/three.js@da05705fa3 (2026-08-12).
Data as JSON: /api/errors/e61dcb4f4618a6e8.
Report an issue: GitHub.