From cf081e839da523fc2e22e7ac6aef404b173079e1 Mon Sep 17 00:00:00 2001 From: iwubcode Date: Mon, 22 Jan 2024 21:46:55 -0600 Subject: [PATCH] VideoCommon: fix compilation error in pixel shaders when per-pixel lighting isn't set for custom shaders --- Source/Core/VideoCommon/PixelShaderGen.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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++) {