From bcb8d11c1b9f0493a29b4bc4ecf40ee75594e9df Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Wed, 31 Aug 2011 20:46:03 +0200 Subject: [PATCH] Reduced the number of redundant vertex shader compilations (possibly to zero). That one was almost too easy ;P --- Source/Core/VideoCommon/Src/VertexShaderGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 747b95c0da..7a1d5eb555 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -37,7 +37,7 @@ void GetVertexShaderId(VERTEXSHADERUID *uid, u32 components) (xfregs.numChan.numColorChans << 27) | (xfregs.dualTexTrans.enabled << 29); - for (int i = 0; i < 2; ++i) { + for (int i = 0; i < xfregs.numChan.numColorChans; ++i) { uid->values[1+i] = xfregs.color[i].enablelighting ? (u32)xfregs.color[i].hex : (u32)xfregs.color[i].matsource;