Fixed shader bug with old hardware
Former-commit-id: c1d70b72de7a469b6cf29268d4351ee257dbae5b
This commit is contained in:
parent
79ac20f48a
commit
5cc0ce4758
|
|
@ -361,9 +361,19 @@ namespace
|
||||||
if (flags & nzShaderFlags_Lighting)
|
if (flags & nzShaderFlags_Lighting)
|
||||||
{
|
{
|
||||||
if (flags & nzShaderFlags_Instancing)
|
if (flags & nzShaderFlags_Instancing)
|
||||||
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix);\n";
|
{
|
||||||
|
if (glsl140)
|
||||||
|
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix);\n";
|
||||||
|
else
|
||||||
|
sourceCode += "mat3 rotationMatrix = mat3(InstanceMatrix[0], InstanceMatrix[1], InstanceMatrix[2]);\n";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix);\n";
|
{
|
||||||
|
if (glsl140)
|
||||||
|
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix);\n";
|
||||||
|
else
|
||||||
|
sourceCode += "mat3 rotationMatrix = mat3(WorldMatrix[0], WorldMatrix[1], WorldMatrix[2]);\n";
|
||||||
|
}
|
||||||
|
|
||||||
if (flags & nzShaderFlags_NormalMapping)
|
if (flags & nzShaderFlags_NormalMapping)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue