Fixed possible bug with old hardware
Former-commit-id: 96cc4312570bd6b16fe6c5b4f9dee41bc2769580
This commit is contained in:
parent
6c2fb1eb89
commit
4ec2b7a120
|
|
@ -365,14 +365,14 @@ namespace
|
||||||
if (glsl140)
|
if (glsl140)
|
||||||
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix);\n";
|
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix);\n";
|
||||||
else
|
else
|
||||||
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix[0], InstanceMatrix[1], InstanceMatrix[2]);\n";
|
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix[0].xyz, InstanceMatrix[1].xyz, InstanceMatrix[2].xyz);\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (glsl140)
|
if (glsl140)
|
||||||
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix);\n";
|
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix);\n";
|
||||||
else
|
else
|
||||||
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix[0], WorldMatrix[1], WorldMatrix[2]);\n";
|
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix[0].xyz, WorldMatrix[1].xyz, WorldMatrix[2].xyz);\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & nzShaderFlags_NormalMapping)
|
if (flags & nzShaderFlags_NormalMapping)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue