{"record":{"id":"03a969fedf26ed7a","repo":"BabylonJS/Babylon.js","slug":"ssr-post-process-this-name-automatic-thickne-03a969","errorCode":null,"errorMessage":"SSR post process \"${this.name}\": Automatic thickness computation requires the geometry renderer block for the back depth texture to have reverse culling enabled!","messagePattern":"SSR post process \"(.+?)\": Automatic thickness computation requires the geometry renderer block for the back depth texture to have reverse culling enabled!","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/dev/core/src/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.ts","lineNumber":437,"sourceCode":"    protected override _buildBlock(state: NodeRenderGraphBuildState) {\r\n        super._buildBlock(state);\r\n\r\n        this._frameGraphTask.normalTexture = this.geomNormal.connectedPoint?.value as FrameGraphTextureHandle;\r\n        this._frameGraphTask.depthTexture = this.geomDepth.connectedPoint?.value as FrameGraphTextureHandle;\r\n        this._frameGraphTask.reflectivityTexture = this.geomReflectivity.connectedPoint?.value as FrameGraphTextureHandle;\r\n        this._frameGraphTask.backDepthTexture = this.geomBackDepth.connectedPoint?.value as FrameGraphTextureHandle;\r\n        this._frameGraphTask.camera = this.camera.connectedPoint?.value as Camera;\r\n\r\n        if (this.enableAutomaticThicknessComputation) {\r\n            if (!this._frameGraphTask.backDepthTexture) {\r\n                throw new Error(`SSR post process \"${this.name}\": Automatic thickness computation requires a back depth texture to be connected!`);\r\n            }\r\n\r\n            const geomBackDepthOwnerBlock = this.geomBackDepth.connectedPoint!.ownerBlock;\r\n            if (geomBackDepthOwnerBlock.getClassName() === \"NodeRenderGraphGeometryRendererBlock\") {\r\n                const geometryBackFaceRendererBlock = geomBackDepthOwnerBlock as NodeRenderGraphGeometryRendererBlock;\r\n                if (!geometryBackFaceRendererBlock.reverseCulling) {\r\n                    throw new Error(\r\n                        `SSR post process \"${this.name}\": Automatic thickness computation requires the geometry renderer block for the back depth texture to have reverse culling enabled!`\r\n                    );\r\n                }\r\n\r\n                if (this._frameGraphTask.depthTexture) {\r\n                    const geomDepthOwnerBlock = this.geomDepth.connectedPoint!.ownerBlock;\r\n                    if (geomDepthOwnerBlock.getClassName() === \"NodeRenderGraphGeometryRendererBlock\") {\r\n                        const geomDepthConnectionPointType = this.geomDepth.connectedPoint!.type;\r\n                        const geomBackDepthConnectionPointType = this.geomBackDepth.connectedPoint!.type;\r\n\r\n                        if (geomDepthConnectionPointType !== geomBackDepthConnectionPointType) {\r\n                            throw new Error(\r\n                                `SSR post process \"${this.name}\": Automatic thickness computation requires that geomDepth and geomBackDepth have the same type (view or screen space depth)!`\r\n                            );\r\n                        }\r\n                    }\r\n                }\r\n            }\r","sourceCodeStart":419,"sourceCodeEnd":455,"githubUrl":"https://github.com/BabylonJS/Babylon.js/blob/0592b347b8a4ee0236089ea86a749cacfdb266d8/packages/dev/core/src/FrameGraph/Node/Blocks/PostProcesses/ssrPostProcessBlock.pure.ts#L419-L455","documentation":"For automatic SSR thickness computation, the block providing the back depth texture must render back faces with reverse culling so depth represents the far side of geometry. If the back depth comes from a NodeRenderGraphGeometryRendererBlock whose reverseCulling is false, _buildBlock throws.","triggerScenarios":"Building a graph where geomBackDepth is connected to a NodeRenderGraphGeometryRendererBlock with reverseCulling left at its default (false) while enableAutomaticThicknessComputation is enabled.","commonSituations":"Wiring the geometry renderer's regular depth output instead of configuring it for back-face depth; forgetting the reverseCulling flag when setting up SSR by hand.","solutions":["Set reverseCulling = true on the geometry renderer block feeding geomBackDepth","Connect geomBackDepth to a dedicated back-face geometry renderer with reverse culling","Disable automatic thickness computation if back-face depth is not available"],"exampleFix":"// before\ngeomRenderer.connect(ssrBlock.geomBackDepth);\n// after\ngeomRenderer.reverseCulling = true;\ngeomRenderer.connect(ssrBlock.geomBackDepth);","handlingStrategy":"validation","validationCode":"const owner = ssrBlock.geomBackDepth.connectedPoint?.ownerBlock;\nif (owner?.getClassName() === 'NodeRenderGraphGeometryRendererBlock' && ssrBlock.enableAutomaticThicknessComputation && !owner.reverseCulling) {\n  owner.reverseCulling = true;\n}","typeGuard":"function isGeomRenderer(b) { return b?.getClassName?.() === 'NodeRenderGraphGeometryRendererBlock'; }","tryCatchPattern":"try { graph.build(); } catch (e) { if (e.message.includes('reverse culling')) { const owner = ssrBlock.geomBackDepth.connectedPoint.ownerBlock; owner.reverseCulling = true; graph.build(); } else { throw e; } }","preventionTips":["Whenever feeding geomBackDepth from a geometry renderer, set reverseCulling = true as a pair","Add a checklist item for SSR setup: back depth + reverse culling + matching depth types","Prefer SSR setup helpers/presets over manual wiring"],"tags":["render-graph","ssr","configuration"],"backgroundTag":"missing-required-input","analyzedSha":"0592b347b8a4ee0236089ea86a749cacfdb266d8","analyzedAt":"2026-08-30T15:11:20.442Z","schemaVersion":2},"datasetVersion":"2026-08-30T18:17:15.746Z"}