A tessellation shader mimicking an explosion

  Posted • University Coursework project

Tessellation and dynamic lighting shaders

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

1 minute read

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

 Creative Commons License