From 154c533e76326089537ea367a560657bb3c642f9 Mon Sep 17 00:00:00 2001 From: NeoBrainX Date: Wed, 10 Apr 2013 11:44:49 +0000 Subject: [PATCH] VertexShaderGen: Fix a small GLSL regression in emboss mapping. --- 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 64f57d4ad0..e4a04102ff 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -417,7 +417,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE ApiType) if (components & (VB_HAS_NRM1|VB_HAS_NRM2)) { // transform the light dir into tangent space - WRITE(p, "ldir = normalize(" I_LIGHTS"[%d + 3].xyz - pos.xyz);\n", texinfo.embosslightshift); + WRITE(p, "ldir = normalize(" I_LIGHTS"[5*%d + 3].xyz - pos.xyz);\n", texinfo.embosslightshift); WRITE(p, "o.tex%d.xyz = o.tex%d.xyz + float3(dot(ldir, _norm1), dot(ldir, _norm2), 0.0f);\n", i, texinfo.embosssourceshift); } else