diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2022-04-22 12:50:44 -0700 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-04-22 16:54:36 -0700 |
| commit | 04fdadd9d5f9588055fb54571410febfa710b86d (patch) | |
| tree | 556444ad28b1c72d71364539a1f69722420ac50a /Source/Core/VideoCommon/LightingShaderGen.cpp | |
| parent | 88134a6786b102dbb9b473fa42d748ae9c64af91 (diff) | |
VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal
Diffstat (limited to 'Source/Core/VideoCommon/LightingShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/LightingShaderGen.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/LightingShaderGen.cpp b/Source/Core/VideoCommon/LightingShaderGen.cpp index a9ff3119bc..5b34e3c89f 100644 --- a/Source/Core/VideoCommon/LightingShaderGen.cpp +++ b/Source/Core/VideoCommon/LightingShaderGen.cpp @@ -27,11 +27,11 @@ static void GenerateLightShader(ShaderCode& object, const LightingUidData& uid_d case AttenuationFunc::Dir: object.Write("ldir = normalize(" LIGHT_POS ".xyz - pos.xyz);\n", LIGHT_POS_PARAMS(index)); object.Write("attn = 1.0;\n"); - object.Write("if (length(ldir) == 0.0)\n\t ldir = _norm0;\n"); + object.Write("if (length(ldir) == 0.0)\n\t ldir = _normal;\n"); break; case AttenuationFunc::Spec: object.Write("ldir = normalize(" LIGHT_POS ".xyz - pos.xyz);\n", LIGHT_POS_PARAMS(index)); - object.Write("attn = (dot(_norm0, ldir) >= 0.0) ? max(0.0, dot(_norm0, " LIGHT_DIR + object.Write("attn = (dot(_normal, ldir) >= 0.0) ? max(0.0, dot(_normal, " LIGHT_DIR ".xyz)) : 0.0;\n", LIGHT_DIR_PARAMS(index)); object.Write("cosAttn = " LIGHT_COSATT ".xyz;\n", LIGHT_COSATT_PARAMS(index)); @@ -64,7 +64,8 @@ static void GenerateLightShader(ShaderCode& object, const LightingUidData& uid_d break; case DiffuseFunc::Sign: case DiffuseFunc::Clamp: - object.Write("lacc.{} += int{}(round(attn * {}dot(ldir, _norm0)) * float{}(" LIGHT_COL ")));\n", + object.Write("lacc.{} += int{}(round(attn * {}dot(ldir, _normal)) * float{}(" LIGHT_COL + ")));\n", swizzle, swizzle_components, diffusefunc != DiffuseFunc::Sign ? "max(0.0," : "(", swizzle_components, LIGHT_COL_PARAMS(index, swizzle)); break; |
