From f524312fd17e62cbc761bb01953c67763fc9242b Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Sat, 29 Jun 2013 22:54:19 +0200 Subject: [PATCH] VertexShaderGen: Fix a potential bug where vertex shader uids don't change when pixel lighting is toggled. --- Source/Core/VideoCommon/Src/VertexShaderGen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 81d45cd6ad..4296f42930 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -279,8 +279,8 @@ static void GenerateVertexShader(T& out, u32 components, API_TYPE api_type) out.Write("o.colors_0 = float4(1.0f, 1.0f, 1.0f, 1.0f);\n"); } - // TODO: This probably isn't necessary if pixel lighting is enabled. - GenerateLightingShader(out, uid_data.lighting, components, I_MATERIALS, I_LIGHTS, "color", "o.colors_"); + if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting) + GenerateLightingShader(out, uid_data.lighting, components, I_MATERIALS, I_LIGHTS, "color", "o.colors_"); if (xfregs.numChan.numColorChans < 2) {