CGII/framework/shader/cgv_gl/glsl/normal.glvs
2018-05-17 16:01:02 +02:00

20 lines
No EOL
519 B
Text

#version 150 compatibility
in vec4 position;
in vec3 normal;
in vec4 color;
in int group_index;
out vec3 normal_gs;
out vec4 color_gs;
vec4 group_color(in vec4 color, int group_index);
vec3 group_transformed_position(in vec3 position, int group_index);
vec3 group_transformed_normal(in vec3 nml, int group_index);
void main()
{
color_gs = group_color(color, group_index);
normal_gs = group_transformed_normal(normal, group_index);
gl_Position = vec4(group_transformed_position(position.xyz, group_index), 1.0);
}