Week 5 Homework

For this week’s assignment I worked with Joshua Linton, and we decided to both port a shader from previous weeks as well as choose one of the remaining options.  While porting the shader, Joshua was having trouble with getting his shader to work, and we discovered the only issue was the fact that while loading the shader, the vert had to come before the frag.

Ported Shader from Last Week:
https://editor.p5js.org/ryanmackboyd/sketches/q2fBsppHg

Afterwards, Joshua chose to create a displacement shader using an image of text that turned out to be something really interesting.  I chose to play with a live video shader, iterating on the Video Paint example through the use of its wobbled offset but instead creating a grid that grew its cells based on the mouse’s y axis and pixelated based on the mouse’s x axis.  The result was a very cool experiment that I call Mirror of Fragments.

Mirror of Fragments:
https://editor.p5js.org/ryanmackboyd/sketches/beBWXEB4b

week5

week52

week53

Through this process I learned the importance of keeping variables consistent between fragment shaders and javascript, so that you can pass information along through the setUniform command.  I also learned that you could map the mouse separately on two axis by creating 2 floats in the fragment shader and then attaching them to the mapped mouseX and mouseY respectively.  Overall this was an enjoyable collaboration between Joshua and I.

 

Leave a Reply