Shaders – W07 – Reflection II

2.1

Going back to my understanding of shaders, GPU, and its history, my basic understanding does not differentiate a lot from the first class. In the first reflection, I mentioned:”…it manipulates data/images by parallel calculating before it is shown on screen. There are a few ways of transformation, including transforming via vertex, pixels, geometry or mesh, etc. After the transformation, shaders will output a new color according to the input.” The last sentence makes a lot of sense to me since often the final output is vec4 output = vec4 (color, 1.0)-ish code.

There are also two very apparent changes to me. One is the effectiveness of GPU: even though I just learned very basic vertex and fragment shaders, I can tell that the patterns I generated sometimes get overlapping thus complex, but usually after running the program for more than 10 minutes will my laptop fan start working. When running p5.js, sometimes the computer just suddenly starts to run the fan. In generating complicated/ delicate patterns, GPU & shaders win to some extent.

Another point is when looking at some shaders now, I will start to analyze if it is made through shaders and how (although most of the time my conclusion was only wow). I just finished watching DUNE, very, unfortunately, 3D, but it still brought me an awesome experience of computer graphics.

2.2 

I have tried to learn a little Unity shaders before, but neither the language nor the content seems to be under my control, so what I could do was just modify the parameters and see the changes. But after touching on learning about other software, I feel like Unity is the one that has an inherited program that allows you to draw something by yourself – it is not importing the content from KodeLife or GLSL, like what we did for processing and p5.js. But the importing method has its benefit too since it allows me to have something in p5 that cannot be done by p5.

Shaders allow me to explore a  more advanced part of computer graphics – it’s not simple geometries anymore, and I can utilize it to design beautiful skybox or patterns. However, the biggest drawback – it’s not that friendly to people who are bad at math and coding, especially those who want to create something in control. My experiences on shaders are very often ~random~. 

2.3

https://www.shadertoy.com/view/fsySWm 

I can tell that the creator wrote many different functions to come up with the basic palette, including keeps slicing by using the fract() function. For some functions like ebox and swave, even though I don’t fully understand the math, I can tell the creator’s intention through the function name.

I noticed that there is a bool in the code where I have never used before. 

bool rnsdf = false;
bvec3 isEdge = bvec3(true);

It is also a bit confusing to me that the initialized bool is not used anymore in the following code. The author’s comments somehow answered my confusion regarding the bool, showing below, turns out boo might be a good too to limit the domain I want to play with.

// the domain of the fractal being generated
// will be modified in the iteration part

https://www.vertexshaderart.com/art/wFtvqKAQ3wB8Hho3p

This project is an audio visualization, where it controls different parts of the model as variables to react to the audio. It is easy to tell some parameters that the author is modifying, like circleId, ringOff, ringId, pointId, and numCircles. It’s pretty new and very interesting that the creator also plays with the camera lookAt in the program, which makes the whole visual keep renewing.  

Take this back to assignment III I made, even though I used the model as an input, the final output looks more like a 2D pattern instead of a 3D perspective visual. If I could take the camera in, I believe the whole visual will be more interesting.