Commit 63080c52 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX] the previous light fix was not a fix. This is the real fix. I missed to...

[FIX] the previous light fix was not a fix. This is the real fix. I missed to mult the normal with the normnal matrix.
parent 8267978c
...@@ -127,7 +127,7 @@ void main() ...@@ -127,7 +127,7 @@ void main()
#endif #endif
// calculate lighting for the surface // calculate lighting for the surface
float light = blinnPhongIlluminationIntensity( normalize( v_normalProjected ) ); float light = blinnPhongIlluminationIntensity( normalize( v_normal ) );
// MPI PAper Hack: { // MPI PAper Hack: {
// vec4 cmap = colormapping(); // vec4 cmap = colormapping();
......
...@@ -94,7 +94,7 @@ void main() ...@@ -94,7 +94,7 @@ void main()
gl_TexCoord[0] = gl_TextureMatrix[0] * vertex; gl_TexCoord[0] = gl_TextureMatrix[0] * vertex;
// some light precalculations // some light precalculations
v_normal = gl_Normal; v_normal = gl_NormalMatrix * gl_Normal;
// NOTE: we normalize the vec here although we need to normalize it again in the fragment shader since the projected vector might be very // NOTE: we normalize the vec here although we need to normalize it again in the fragment shader since the projected vector might be very
// small and we want to avoid numerical issues when interpolating. // small and we want to avoid numerical issues when interpolating.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment