Fixed ShaderBuilder inserting unused varying
Former-commit-id: bb61f7332c41440901560838f6cda8b071f7422b
This commit is contained in:
@@ -98,7 +98,7 @@ namespace
|
||||
{
|
||||
if (flags & nzShaderBuilder_NormalMapping)
|
||||
sourceCode += inKW + " mat3 vLightToWorld;\n";
|
||||
|
||||
else
|
||||
sourceCode += inKW + " vec3 vNormal;\n";
|
||||
}
|
||||
|
||||
@@ -328,8 +328,8 @@ namespace
|
||||
if (flags & nzShaderBuilder_Lighting)
|
||||
{
|
||||
if (flags & nzShaderBuilder_NormalMapping)
|
||||
sourceCode += outKW + " mat3 vLightToWorld;";
|
||||
|
||||
sourceCode += outKW + " mat3 vLightToWorld;\n";
|
||||
else
|
||||
sourceCode += outKW + " vec3 vNormal;\n";
|
||||
}
|
||||
|
||||
@@ -359,7 +359,7 @@ namespace
|
||||
"vLightToWorld[2] = normalize(VertexNormal * RotationMatrix);\n"
|
||||
"\n";
|
||||
}
|
||||
|
||||
else
|
||||
sourceCode += "vNormal = normalize(RotationMatrix * VertexNormal);\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user