-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgeometryShader.geom
More file actions
22 lines (19 loc) · 866 Bytes
/
geometryShader.geom
File metadata and controls
22 lines (19 loc) · 866 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
Purpose: This code describes the function of Prometheus's geometry shader. Implementing the graphics using the
OpenGL Shading Language (GLSL) ensures efficient visualization and contributes to the code's longevity. This
shader can determine which model is being requested from the GUI and activate the appropriate subroutines
to generate that model. Atom coordinates are passed to this shader in a vertex buffer object (VBO), and vertices of
the model being displayed (spheres, cylinders, surfaces) are all generated procedurally within this shader. We leverage the
power of the GPU to do as much of the heavy lifting as possible.
*/
layout(points) in;
layout(points) out;
void main(void)
{
for (i = 0; i < gl_in.length(); i++)
{
gl_Position = gl_in[i].gl_Position;
EmitVertex();
}
EndPrimitive();
}