Merge pull request #3659 from Tilka/posmtx

VertexShaderGen: turn pseudo-mod into a simple and
This commit is contained in:
Pierre Bourdon 2016-02-20 14:29:16 +01:00
commit ca925dc90f
1 changed files with 1 additions and 1 deletions

View File

@ -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");
}