Wrong direction, wrong lighting!

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 11 years ago
parent 11fe86e552
commit 8269ec7be5

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

Loading…
Cancel
Save