VertexShaderGen: Fix a small GLSL regression in emboss mapping.
This commit is contained in:
parent
b30c5b0048
commit
154c533e76
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue