In this first project, you will create a sandbox for experimenting with fragment shaders and the OpenGL Shading Language (GLSL). You will render a single, screen-filling quadrilateral and paint designs on it using only algorithms that can be expressed in the fragment shader. This project is inspired by Shadertoy.
To receive credit for this project, you must meet the following requirements:
rastercaster
in the single Git repository that you are using for all your projects.f
with this interface: vec3 f() { // compute color return color; }Call this function from
main
.textarea
in the HTML in which the user can type in a custom definition of f
.textarea
, inject the user’s definition of f
into your fragment shader, recompile, and re-render.vec2
uniform named dimensions
that holds the viewport’s width and height in pixels.f
. Use any builtin GLSL functions or your own helper functions. Art is a subjective term. In general, each piece should be interesting in some aesthetic or algorithmic way and feel like it was crafted by a human artist.#gallery
screenshots of your five designs and their accompanying definitions of f
. Each design must be unique amongst both your own designs and others’ designs.If you finish early, consider exploring these extra challenges:
vec2
uniform named mouse
that holds the mouse’s position in pixels.float
uniform named time
that holds the number of seconds that have elapsed since the page was loaded.When you have completed all requirements, push your code to your remote repository and send your instructor a direct message on Slack to schedule a 10-minute review. Only one project can be granted credit each week. Plan accordingly.
Comments