summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2016-02-20 02:52:30 +0000
committerTillmann Karras <tilkax@gmail.com>2016-02-20 03:29:08 +0000
commit4ecd191a7e65a3639bed6cbffa48ed8741639ef9 (patch)
tree08585ee6c70cee84e0cb1413cb8d2465cc2617aa /Source/Core
parent1f2b1caf422474d02d465ee4c8fa16f066aeb011 (diff)
VertexShaderGen: turn pseudo-mod into a simple and
The type of posmtx has changed over time: half -> float -> int. I assume this is supposed to be a modulo.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index ad99b445c0..9a9a23b5b9 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -135,7 +135,7 @@ static T GenerateVertexShader(API_TYPE api_type)
if (components & VB_HAS_NRMALL)
{
- out.Write("int normidx = posmtx >= 32 ? (posmtx-32) : posmtx;\n");
+ out.Write("int normidx = posmtx & 31;\n");
out.Write("float3 N0 = " I_NORMALMATRICES"[normidx].xyz, N1 = " I_NORMALMATRICES"[normidx+1].xyz, N2 = " I_NORMALMATRICES"[normidx+2].xyz;\n");
}