A tessellation shader mimicking an explosion

  Posted Wednesday, March 13th, 2019 • University Coursework

Tessellation and dynamic lighting shaders

I put a simple cube mesh through some torture in order to learn how to write shaders.

I created a series of shaders in GLSL for use with OpenGL in C++ to demonstrate core concepts of vertex, fragment and geometry (tesselation) shading. I also used interpolation between textures, and lightmaps and conditional evaluation to provide transparency.

I gained experience writing shaders, including implementing lighting algorithms (diffuse, specular, phong) to manipulate scene objects in a 3D simulation.

In order...

Shrink Shader

Vertex shader to scale model down with conditional evaluation (for transparency)

Blend Shader

Two textures are interpolated between, and positions manipulated

Fade Shader

Fragment shader to fade away according to texture lightmap

Split Shader

Geometry shader to make each vertex of the cube split into smaller cubes, with random movement

Phong Shader

Tessellation control shader for deformation, with real-time lighting

Smash Shader

Tessellation control and evaluation shaders to add detail and smash model