diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 2ee3857077..3208475ddf 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -219,11 +219,11 @@ const char *GenerateVertexShader(u32 components) } if (!(components & VB_HAS_NRM0)) - WRITE(p, "half3 _norm0 = half3(0,0,0), norm0= half3(0,0,0);\n"); + WRITE(p, "half3 _norm0 = half3(0,0,0), norm0 = half3(0,0,0);\n"); WRITE(p, "o.pos = float4(dot("I_PROJECTION".T0, pos), dot("I_PROJECTION".T1, pos), dot("I_PROJECTION".T2, pos), dot("I_PROJECTION".T3, pos));\n"); - WRITE(p, "half4 mat, lacc;\n" + WRITE(p, "half4 mat;\n" // = half4(1,1,1,1), lacc = half4(0,0,0,0);\n" "half3 ldir, h;\n" "half dist, dist2, attn;\n"); @@ -235,20 +235,23 @@ const char *GenerateVertexShader(u32 components) const LitChannel& alpha = xfregs.colChans[j].alpha; WRITE(p, "{\n"); - + + WRITE(p, "half4 lacc = half4(1,1,1,1);\n"); if (color.matsource) {// from vertex - if (components & (VB_HAS_COL0<