CGII/framework/shader/plot/glsl/plot2d_face.glfs

22 lines
399 B
Text
Raw Normal View History

2018-05-17 14:01:02 +00:00
#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);
}
}