Shader Fun
This project was a task from CIS 4600/5600 involving writing shaders to be applied on some object - in this case, Mario! I experimented with different kinds of shaders, including ones that involved vertex deformations and fragment shader operations. I also learned how to write post-processing shaders. The images above feature just a few of the fun end results that I obtained from combining different shaders.
C++
GLSL
Qt
Surface Shaders
Surface shaders are programs that will take in vertex data and translate them into colors on the screen through the GPU. In my custom vertex deformation shader (the one where a bulge seems to move through Mario), I modified the positions for each vertex, and for the other shaders, I updated the pixel colors through the fragment shader, taking vertex positions as input.
Below is a demo of these surface shaders in action!
Post-Processing Shaders
These shaders create effects across the entire screen, rather than just the character model of Mario. For these, I treated the scene as a rectangle, i.e. just a simple 2D image rather than a 3D scene with information about vertex positions, normals, colors, etc.
By doing so, I could achieve effects like the greyscale and gaussian blur, which used neighboring pixel data to determine the color of the current pixel. My favorite of these was the Sobel effect, which created a cool, high contrast outline look of Mario!
Below is a demo of these post-processing shaders in action!