Weiqi Wu – Week 2 Homework


While making Gradient #1, I understand how to use mix() to blend the colors. During the making process, I was trying to find other forms to do the color blending. Looking at the book of shader, I found out that the “shape” chapter, it introduces how to use shading function to create various shapes other than a straight line. Therefore, I learned how to use code to calculate the radius and angles of each pixel and use the function to change the radius of a circle. And the outcome will be the below images.




While making Gradient #2, I learned that there is a way to turn HSB color into RGB color setting, which will be more convenient for me to make. And I tried a lot of time changing the setting and mouse interaction, as well as the shading function to adjust the original coding. I played with sin(), as well as u_time, and mouse XY. I found it really fun to have interaction between the shader and people.

Video       Code

Leave a Reply

Your email address will not be published. Required fields are marked *