Posted Wednesday, March 13th, 2019 • University Coursework
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.
Vertex shader to scale model down with conditional evaluation (for transparency)
Two textures are interpolated between, and positions manipulated
Fragment shader to fade away according to texture lightmap
Geometry shader to make each vertex of the cube split into smaller cubes, with random movement
Tessellation control shader for deformation, with real-time lighting
Tessellation control and evaluation shaders to add detail and smash model