{"record":{"id":"e61dcb4f4618a6e8","repo":"mrdoob/three.js","slug":"three-webgpurenderer-shadow-map-type-not-supporte","errorCode":null,"errorMessage":"THREE.WebGPURenderer: Shadow map type not supported yet.","messagePattern":"THREE\\.WebGPURenderer: Shadow map type not supported yet\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"src/nodes/lighting/ShadowNode.js","lineNumber":544,"sourceCode":"\t\t\tconst highpShadowModelMatrix = uniform( 'mat4' ).onObjectUpdate( ( { object }, self ) => {\n\n\t\t\t\treturn self.value.multiplyMatrices( shadowMatrix.value, object.matrixWorld );\n\n\t\t\t} );\n\n\t\t\tshadowPosition = highpShadowModelMatrix.mul( positionLocal ).add( shadowMatrix.mul( vec4( shadowNormalBias, 0 ) ) );\n\n\t\t}\n\n\t\tconst shadowCoord = this.setupShadowCoord( builder, shadowPosition );\n\n\t\t//\n\n\t\tconst filterFn = shadow.filterNode || this.getShadowFilterFn( renderer.shadowMap.type ) || null;\n\n\t\tif ( filterFn === null ) {\n\n\t\t\tthrow new Error( 'THREE.WebGPURenderer: Shadow map type not supported yet.' );\n\n\t\t}\n\n\t\tconst shadowDepthTexture = ( shadowMapType === VSMShadowMap && shadow.isPointLightShadow !== true ) ? this.vsmShadowMapHorizontal.texture : depthTexture;\n\n\t\tconst shadowNode = this.setupShadowFilter( builder, { filterFn, shadowTexture: shadowMap.texture, depthTexture: shadowDepthTexture, shadowCoord, shadow, depthLayer: this.depthLayer } );\n\n\t\tlet shadowColor;\n\n\t\tif ( renderer.shadowMap.transmitted === true ) {\n\n\t\t\tif ( shadowMap.texture.isCubeTexture ) {\n\n\t\t\t\t// For cube shadow maps (point lights), use cubeTexture with vec3 coordinates\n\t\t\t\tshadowColor = cubeTexture( shadowMap.texture, shadowCoord.xyz );\n\n\t\t\t} else {\n","sourceCodeStart":526,"sourceCodeEnd":562,"githubUrl":"https://github.com/mrdoob/three.js/blob/da05705fa31f02710c19772a2aa70c7454807f0c/src/nodes/lighting/ShadowNode.js#L526-L562","documentation":"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.","triggerScenarios":"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.","commonSituations":"Upgrading Three.js where PCFSoftShadowMap was removed from the WebGPU/node renderer; copy-pasting shadow config from an older project; numeric type value corruption.","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)."],"exampleFix":"// before\nrenderer.shadowMap.type = PCFSoftShadowMap;\n\n// after\nrenderer.shadowMap.type = PCFShadowMap;","handlingStrategy":"validation","validationCode":"import { BasicShadowMap, PCFShadowMap, VSMShadowMap } from 'three';\nconst SUPPORTED_SHADOW_TYPES = new Set( [ BasicShadowMap, PCFShadowMap, VSMShadowMap ] );\nfunction assertShadowType( type ) {\n  if ( ! SUPPORTED_SHADOW_TYPES.has( type ) ) throw new Error( `Unsupported shadow map type: ${ type }` );\n}\n\nassertShadowType( renderer.shadowMap.type );","typeGuard":"const isSupportedShadowType = ( t ) => SUPPORTED_SHADOW_TYPES.has( t );","tryCatchPattern":null,"preventionTips":["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."],"tags":["shadow","webgpu-renderer","deprecated","configuration"],"backgroundTag":null,"analyzedSha":"da05705fa31f02710c19772a2aa70c7454807f0c","analyzedAt":"2026-08-12T22:51:37.160Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}