summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/PixelShaderGen.cpp
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2024-01-22 21:46:55 -0600
committeriwubcode <iwubcode@users.noreply.github.com>2024-01-23 21:50:42 -0600
commitcf081e839da523fc2e22e7ac6aef404b173079e1 (patch)
treeed525dacb01c29e48e60b66218ae3ae4af71eb12 /Source/Core/VideoCommon/PixelShaderGen.cpp
parenta8d45b8e55969ea7e979f03372db5cf904ca0344 (diff)
VideoCommon: fix compilation error in pixel shaders when per-pixel lighting isn't set for custom shaders
Diffstat (limited to 'Source/Core/VideoCommon/PixelShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index 61a351742b..0d6efe9f6a 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -839,7 +839,8 @@ void WriteCustomShaderStructImpl(ShaderCode* out, u32 num_stages, bool per_pixel
texcoord);
}
- GenerateCustomLightingImplementation(out, uid_data->lighting, "colors_");
+ if (per_pixel_lighting)
+ GenerateCustomLightingImplementation(out, uid_data->lighting, "colors_");
for (u32 i = 0; i < 16; i++)
{