GCodeViewer -> Shaders code cleanup

This commit is contained in:
enricoturri1966 2020-05-28 09:23:30 +02:00
parent edaabf3fbd
commit 9c8892c869
6 changed files with 10 additions and 30 deletions

View file

@ -17,7 +17,6 @@ uniform vec3 uniform_color;
varying vec3 eye_position;
varying vec3 eye_normal;
//varying float world_normal_z;
// x = tainted, y = specular;
vec2 intensity;
@ -37,9 +36,5 @@ void main()
NdotL = max(dot(normal, LIGHT_FRONT_DIR), 0.0);
intensity.x += NdotL * LIGHT_FRONT_DIFFUSE;
// // darkens fragments whose normal points downward
// if (world_normal_z < 0.0)
// intensity.x *= (1.0 + world_normal_z * (1.0 - INTENSITY_AMBIENT));
gl_FragColor = vec4(vec3(intensity.y, intensity.y, intensity.y) + uniform_color * intensity.x, 1.0);
}