This page demonstrates my work with OpenGL shaders. This was spread across two modules in my third year at De Montfort University.
Source code is currently pending for both modules.
Module One: Shader Programming
Assignment one was purely a lighting assignment, demonstrated in the video below. This begins with simple lighting, with a Blinn-Phong reflection model and TBN normal mapping, plus specular mapping. These all give the otherwise flat, 2D textures a very realistic 3D appearance. The scene contains point lights, spot lights (including a torch-style spotlight attached to the camera), and a directional scene light. There are also simple shadows being cast by the directional light.
I then expanded further, implementing a number of post-processing shaders controlled via hotkeys. These are demonstrated in order, showing greyscale, colour inversion, night vision (green filter), a filter which only allows vertices above a certain light level to render, blur, and finally glow.
This project achieved a final grade of 75.
Source code is available on GitHub: https://github.com/Fureniku/IMAT3906-Shaders-Public. This must be run as Debug x86; 64-bit is not supported due to the initial provided project not having support.
Module Two: Advanced Shader Programming
This module focused more on the shader pipeline, and introduced tessellation control/evaluation shaders, geometry shaders, and compute shaders, as well as some more shader techniques.
In the video example below, the camera flies through procedurally generated terrain with water. The terrain is generated as a heightmap from a compute shader, which utilises Perlin noise. The noise algorithm takes the camera’s current position, which allows the terrain to be generated infinitely with periodic updates based on the movement of the camera in order to keep good performance. This then additionally uses distant-dependent tessellation to add more details on closer objects, allowing a high render distance.
The terrain then has textures applied based on the height, with a muddy appearance under the water, sand around the coast line, and then grass, stone, and finally snow for the highest sections. The terrain additionally uses the same lighting shaders as the previous module, as demonstrated by the blue cube in the video.
Additionally, there is a water plane with reflection and refraction, varied utilising the fresnel effect depending on the camera’s position.
This module achieved a final grade of 83, and the skybox was added post-submission.
Source code is available on GitHub: https://github.com/Fureniku/IMAT3907-Advanced-Shaders-Public – as with the previous assignment, this must be run as Debug x86 and 64 bit is not supported.