From f744c11fb07433c64869c594145bb514435ecdf9 Mon Sep 17 00:00:00 2001 From: Gustav Sterbrant Date: Mon, 16 Jan 2023 19:20:55 +0000 Subject: [PATCH] Fix shadow map using vertex normals. --- src/scene/shader-lib/programs/lit-shader.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scene/shader-lib/programs/lit-shader.js b/src/scene/shader-lib/programs/lit-shader.js index ddfc6b964b5..1b4836f0604 100644 --- a/src/scene/shader-lib/programs/lit-shader.js +++ b/src/scene/shader-lib/programs/lit-shader.js @@ -91,6 +91,7 @@ class LitShader { this.shadowPass = ShaderPass.isShadow(options.pass); this.needsNormal = this.lighting || this.reflections || options.useSpecular || options.ambientSH || options.heightMapEnabled || options.enableGGXSpecular || (options.clusteredLightingEnabled && !this.shadowPass) || options.clearCoatNormalMapEnabled; + this.needsNormal = this.needsNormal && !this.shadowPass; this.needsSceneColor = options.useDynamicRefraction; this.needsScreenSize = options.useDynamicRefraction; this.needsTransforms = options.useDynamicRefraction;