Assignment 03 - GLSL Fragment Shader Karate
04 Sep 2018The objective of this work is to have fun learning and practicing more shader development along with starting to pick-up a variety of techniques for procedural shading.
We will largely follow along The Book of Shaders, a very well designed resource for active learning and practice of shader techniques. We will also be using a slight variant of glslViewer as the platform for displaying our fragment shaders in this exercise. Some of the reasons for use include standard uniform variables such as for checking the passage of time since the shader started or the position of the mouse cursor; these will be consistent also with The Book of Shaders.
This package includes a folder with the executable and code that can run on the DPA Linux machines. (Thanks to Zach Shore for pointing out an issue and fix for use of u_time). You are welcome to re-compile for other platforms if desired. Note that if you do, this folder needs to be in the same folder (next-to) the common folder that includes GLFW from your last assignment. If you work from DPA Linux machines, however, you do not need to compile anything but simply run while writing new fragment shaders. The glslViewer program should allow you to live-edit your shaders, if you wish, with a Sublime plug-in or by writing the file back in Vi, or similar. (If you’d like to use this on a Mac, directly download from the GitHub page and follow the directions to build – it’s pretty quick and simple, thankfully).
Ok, for the assignment – the purpose is to get a feel for shaping functions, patterns, noise, etc. – all tools in generative/procedural art as well as in generating patterns for shaders in general, whether programmatic or in a node-based shader network. Choose ideas that you will enjoy. Seek gaining experience with the shift in thinking for technically developing visual code within a shader that is run independently on separate cores. Have fun and experiment with creating interesting and appealing visuals. The assignment will be evaluated on functionality, creativity, and look – while you should try to execute and match the intent of your chosen objectives, the priority should be placed on learning and experimenting with visual development within GLSL. These skills will help build your procedural toolset for any generative art or procedural shader development.
Come prepared to present your shaders for class critique on Thursday, September 13. Save one screen capture per fragment shader that you author. Create a brief pdf file that includes your images and a few sentences on your technique or other thoughts for each. Upload these and your four shader files in a .tgz file named dpa8090lastname.tgz to Canvas for the Assignment 03 entry.
Develop GLSL fragment shaders, one each from the following groups, named as given:
- Variations and Gradients with Shaping Functions
- Create a gradient resembling a sunset in a William-Turner painting (wt.frag).
- Transition from sunrise to sunset (day.frag).
- Create a rainbow (rainbow.frag).
- Playing with Color
- Reproduce the bottom-most William Home Lizars 1834 spectra hue diagram (lizars.frag).
- Generate and display a color wheel as a circular visualization (wheel.frag).
- Reproduce one of Alber’s interaction of color plates (albers.frag).
- Shapes and Patterns
- Emulate a Piet-Mondrian grid-based painting (mondrian.frag).
- Create three circle or distance-field compositions (cirdist.frag).
- Animate snoflakes or gears interacting (snowgear.frag).
- Create a “logo” using polar coordinates and distance field (logo.frag).
- Generate patterns similar to Tartan patterns (tartan.frag).
- Cells and Noise
- Generate a cell pattern similar to Ryoji Ikeda’s work or one of the exercises posted right below on The Book of Shaders (ikeda.frag).
- Make a composition of rectangles, colors, and noise to resemble a Mark Rothko painting, other than one of his all-black canvasesi (rothko.frag).
- Use a noise function to generate a pattern similar to granite or marble (rock.frag).
- Make a generative Jackson-Pollock-like composition (jp.frag).
- Make a shader that projects the illusion of flow like a lava lamp, ink drops, or similar fluid (flow.frag).
- Construct an interesting pattern that resembles a look or material using cellular noise or the Voronoi algorithm (cell.frag).
- Construct an interesting pattern that resembles a look or material using either fBM or turbulence (fbmturb.frag).
