Geometry Shaders: emitting, and starting with a whole triangle Can we make the cube have extra faces that are further away? Of course! We can use "if" statements over the whole thing Do we want to apply the MVP, or have a different shader do it? We probably want to apply it in the geometry shader That way we can work in model space instead of world space Geometry shaders and loss of parallelism: Once per primitive, instead of once per vertex Easy to contrive a workflow that reduces parallelism gl_InvocationID and multiple invocations of the same geometry shader Need OpenGL 4.0+ for this Tesselation Shaders: Two pieces: Tesselation Control Shader, Tesselation Evaluation Shader TCS -> Primitive Generator -> TES TCS outputs: Tessellation Level Vertices (can move stuff, like vertex and geometry shaders) Optional, can use glPatchParameterfv to set default values Transformation can be applied in the vertex shader instead Primitive Generation: Normalized Coordinates (Barycentric coordinates) In triangles vs. in quads No awareness of "actual" coordinates! Tessellation levels: In general, these are the number of segments an edge is tessellated into Edge tessellation should match the neighboring patch Triangles: One inner level, three outer levels Can be discareded if level is 0 That allows the TCS to cull patches Picture of how these come together TES outputs: gl_Position Anything else we've defined, like color Calculate this from: gl_TessCoord (vec3, barycentric coordinates) gl_in with patch vertices Demo: Add a tcs and tes to the cube to make it into a sphere using normalize Compute Shaders: 3D grid of workgroups Placing instances in a 3D grid can help organize image or spacial processing Or other stuff, but I think that was the intent If you don't really want a 3D grid, just pick one dimension to use Storage! Shader Storage Buffers in/out parameter, basically We have to explain the layout We did that already with the vertex shader and positions bound by number Cube top/bottom bounce demo You can use a compute shader for something that has nothing to do with graphics at all