From 2f85b258e9f0cbfba2e3358cd248d3e167f35381 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sat, 2 Mar 2013 19:06:24 +0100 Subject: [PATCH] Fixed normal lighting rotation Former-commit-id: 06c71dd9d5ee90fa9d3fbce8e87dcff6b8a455d9 --- src/Nazara/Renderer/ShaderBuilder.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Nazara/Renderer/ShaderBuilder.cpp b/src/Nazara/Renderer/ShaderBuilder.cpp index 4c396da0f..9ee93fe5f 100644 --- a/src/Nazara/Renderer/ShaderBuilder.cpp +++ b/src/Nazara/Renderer/ShaderBuilder.cpp @@ -369,9 +369,9 @@ namespace { sourceCode += "\n" "vec3 binormal = cross(VertexNormal, VertexTangent);\n" - "vLightToWorld[0] = normalize(VertexTangent * rotationMatrix);\n" - "vLightToWorld[1] = normalize(binormal * rotationMatrix);\n" - "vLightToWorld[2] = normalize(VertexNormal * rotationMatrix);\n" + "vLightToWorld[0] = normalize(rotationMatrix * VertexTangent);\n" + "vLightToWorld[1] = normalize(rotationMatrix * binormal);\n" + "vLightToWorld[2] = normalize(rotationMatrix * VertexNormal);\n" "\n"; } else