33 lines
No EOL
556 B
Text
33 lines
No EOL
556 B
Text
#version 150 compatibility
|
|
#extension GL_EXT_geometry_shader4 : enable
|
|
|
|
uniform vec3 line_color;
|
|
uniform vec3 stick_color;
|
|
|
|
uniform bool show_lines;
|
|
uniform bool show_sticks;
|
|
|
|
in vec4 base_pos[];
|
|
|
|
out vec3 color;
|
|
|
|
void main()
|
|
{
|
|
if (show_lines) {
|
|
color = line_color;
|
|
gl_Position = gl_PositionIn[0];
|
|
EmitVertex();
|
|
gl_Position = gl_PositionIn[1];
|
|
EmitVertex();
|
|
EndPrimitive();
|
|
}
|
|
|
|
if (show_sticks) {
|
|
color = stick_color;
|
|
gl_Position = base_pos[0];
|
|
EmitVertex();
|
|
gl_Position = gl_PositionIn[0];
|
|
EmitVertex();
|
|
EndPrimitive();
|
|
}
|
|
} |