TSBK03 Geometry and tesselation demos

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, 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.

Skärmavbild 2017-10-12 kl. 09.52.11


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:

Skärmavbild 2017-10-12 kl. 09.52.57


Heavy metal teapot

Finally, I have included a demo that is really still in its infancy. It is very new, and 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!

Skärmavbild 2017-10-12 kl. 10.06.09


This page is maintained by Ingemar Ragnemalm.