Skip to content

Commit

Permalink
Fix normal bias getting enabled when a light is VSM even if it should…
Browse files Browse the repository at this point in the history
…n't. (#5417)
  • Loading branch information
GSterbrant committed Jun 20, 2023
1 parent 3abf864 commit 5ffc7a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/scene/shader-lib/programs/lit-shader.js
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ class LitShader {
}

if (shadowReadMode !== null) {
if (light._normalOffsetBias) {
if (light._normalOffsetBias && !light._isVsm) {
func.append("#define SHADOW_SAMPLE_NORMAL_OFFSET");
}
if (lightType === LIGHTTYPE_DIRECTIONAL) {
Expand Down

0 comments on commit 5ffc7a3

Please sign in to comment.