06 - OpenGL Flashcards
What are the “Naming Conventions” for “OpenGL Functions”, “OpenGL Constants”, “OpenGL Types”
OpenGL Functions => gl
OpenGL Constants => GL_
OpenGL Types => GL
Why are “GL_POINTS” and “GL_LINES” ugly? How to fix it
- infinity width => no anti-aliasing
- fix: use thin triangles
How does the “Vertex Shader” work
- transform each vertex individually (e.g. “Gouraud Shading”)
=> better for transformations (only vertices of object must be moved, not all pixels in a fragment) - can’t add or delete vertices
- input: vertex with attributes
- output: vertex with attributes
How do the “Primitive Assembly” and “Tessellation Shader” work
“Primitive Assembly”
- input: n vertices
-> compose requested primitives
-> special case: GL_PATCH
“Tessellation Shader”
- uses GL_PATCH
- how should patches be subdivided
- how should the result be shaded
How does the “Geometry Shader” work? What other parts (not programmable) work with it?
- extend, remove, transform primitives
- also:
– clipping (result will be de-homogenized)
– rasterization (outputs fragments)
How does the “Fragment Shader” work? What other parts (not programmable) work with it?
- input: 1 fragment
- output: 0-1 fragments
- can discard
- per-pixel shading (e.g. Phong-Shading)
- per-pixel sampling (e.g. volume rendering -> ray casting)
-also:
– per fragment operations
What is the “Transform Feedback”
- writes result of geometry processing to a buffer
- buffer can be put into the pipeline by CPU
How does the “Compute Shader” work
- input: indices
=> called by indices - execution of compute shader organized in grid of workgroups
- indices say what workgroups run with what threads
=> massive parallel execution
IMPORTANT: Not in the pipeline