From 8269ec7be579fc68ded9ee72950d29aaa9276113 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Wed, 18 Sep 2013 08:33:55 +0200 Subject: [PATCH] Wrong direction, wrong lighting! --HG-- branch : gsoc2013-dfighter --- code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp b/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp index 0c0c896ba..8269a5a1c 100644 --- a/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp +++ b/code/nel/src/3d/driver/OpenGL3/driver_glsl_shader_generator.cpp @@ -413,7 +413,7 @@ namespace NL3D { ss << "float getIntensity" << num << "( vec3 normal3, vec3 lightDir )" << std::endl; ss << "{" << std::endl; - ss << "float angle = dot( normalize( lightDir ), normal3 );" << std::endl; + ss << "float angle = dot( normalize( -lightDir ), normal3 );" << std::endl; ss << "angle = max( 0.0, angle );" << std::endl; ss << "return angle;" << std::endl; ss << "}" << std::endl;