Geometry and tesselation shaders are additional shader stages that add a lot of possibilities.
Triple Stanford geometry shader demo
In my opinion, the geometry shader stage is the most important one of these, since it has so many applications, and its initial performance problems for tesselation is pretty much solved with instancing. Here is my “Triple Stanford” demo, which means that it is a demo that includes three simple geometry shaders. It isn’t high tech but may help you get started with geometry shaders.
New version modernized/tested under Linux:
Tesselated triangle
Tesselation shaders are specialized on tesselation, and therefore the easiest way to do flexible tesselation. Here is my extremely simple tesselation of a single triangle:
Updated version:
Heavy metal teapot
This demo is really still in its infancy. It needs some corrections and improvements, but I think it can still be a demonstration on how to do this, namely displacement mapping.
Displacement mapping is “bump mapping for real”, deforming a model after a bump map. This time we don’t just change the normal vectors (although that should also be included which it isn’t here) but change the geometry so there are actual protrusions, they can’t be cut off when you have a view that goes outside the rectangle.
Again, this is just a draft at this point! Corrections are welcome!
New version tested under Linux:
Geometry shader instancing
Minimalistic demo of how instancing is performed with geometry shaders, improving parallellism.
Hairy stanford
Geometry shader for visualizing normal vectors, resulting in a first step towards hair generation
Note: I made a mistake with two shaders, with a version not supported on a Mac. Just change back to 150, or anything supported.
The Candide face model tesselated in a geometry shader.
The demo will intentionally run into a max level when it does not allocate enough data per run.
Adjacency demo
This demo shows how adjancey data can be created (brute force) and applied to create a simple outline.