The idea here is that each fragment shader is completely self contained, providing all the functions in the file to achieve the desired pattern.
- Fragment shader inputs from vertex shader.
- Fragment shader output. Typically just the pixel colour.
- Any expected uniforms that should be set outside the fragment shader. (If any present, likely required to be filled for shader to work as expected)
- Defines.
- Functions used from other peoples work with credit given.
- General purpose functions (Likely found across multiple files)
- Pattern specific functions
- The main, demonstrating each of the pattern functions.