diff options
| author | Lioncash <mathew1800@gmail.com> | 2014-08-30 16:51:27 -0400 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-08-30 18:06:45 -0400 |
| commit | 4af8d9d2487c58953e919769db33b20bc062d6ea (patch) | |
| tree | 753b4b794c64cfbd72f85ec767c38608854157aa /Source/Core/VideoCommon/VertexShaderGen.cpp | |
| parent | bc14d6966f996c482ea97aa9b424e34091bfc8ec (diff) | |
VideoCommon: Clean up brace placements
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VertexShaderGen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp index f02d4133b6..293b75cc78 100644 --- a/Source/Core/VideoCommon/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/VertexShaderGen.cpp @@ -188,11 +188,13 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ { out.Write("float4 pos = float4(dot(" I_TRANSFORMMATRICES"[posmtx], rawpos), dot(" I_TRANSFORMMATRICES"[posmtx+1], rawpos), dot(" I_TRANSFORMMATRICES"[posmtx+2], rawpos), 1);\n"); - if (components & VB_HAS_NRMALL) { + if (components & VB_HAS_NRMALL) + { out.Write("int normidx = posmtx >= 32 ? (posmtx-32) : posmtx;\n"); out.Write("float3 N0 = " I_NORMALMATRICES"[normidx].xyz, N1 = " I_NORMALMATRICES"[normidx+1].xyz, N2 = " I_NORMALMATRICES"[normidx+2].xyz;\n"); } } + if (components & VB_HAS_NRM0) out.Write("float3 _norm0 = normalize(float3(dot(N0, rawnorm0), dot(N1, rawnorm0), dot(N2, rawnorm0)));\n"); if (components & VB_HAS_NRM1) |
