CGII/framework/shader/plot/glsl/plot2d_face.glfs
2018-05-17 16:01:02 +02:00

22 lines
No EOL
399 B
Text

#version 150 compatibility
uniform int face_illumination;
uniform vec3 face_color;
in vec3 eye_position;
in vec3 normal;
vec4 doLighting(vec3 position, vec3 normal, vec4 diffuseMaterial);
void main()
{
// compute bump mapped normal
vec4 diff = vec4(face_color,1.0);
if (face_illumination == 0) {
gl_FragColor = diff;
}
else {
gl_FragColor = doLighting(eye_position, normal, diff);
}
}