Normalize normals in normal view.

This commit is contained in:
Vincent Lejeune 2014-08-09 21:24:50 +02:00
parent c546b25ae9
commit 020e939e2b

View File

@ -11,7 +11,7 @@ void main()
gl_Position = pos;
EmitVertex();
vec3 normal = nor[i];
vec3 normal = normalize(nor[i]);
pos = inverse(ProjectionMatrix) * pos;
pos /= pos.w;
gl_Position = ProjectionMatrix * (pos + .2 * vec4(normal, 0.));