Fixed ShaderBuilder inserting unused varying

Former-commit-id: bb61f7332c41440901560838f6cda8b071f7422b
This commit is contained in:
Lynix 2013-01-30 01:36:54 +01:00
parent 692c578673
commit ff9c61735c
1 changed files with 8 additions and 8 deletions

View File

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