Shaders, smooth color math, and what’s next 🤓 | June 22, 2026

This Week’s Highlight

Woot woot! The final episode of this series is here!

Wow, I am super proud of myself for crossing the finish line on this one. Creating this felt like a true rite of passage into the world of shaders, and it completely got me back into the groove of making tutorials again. What a refreshing start.

Give your girl some love and check it out!

What Inspires Me

In this week's video, I didn't get to fully geek out on the amazing math behind creating the color palettes. So... allow me 🤓

Usually, to change a color, we think about adding red, green, or blue linearly. However, linear transitions can look harsh and artificial. Cosine palettes solve this by using a wave function instead:

color(t) = a + b ⋅ cos[ 2π(c⋅t+d)]

This works perfectly in shaders because modern GPUs compute trigonometric functions directly at the hardware level, making the process incredibly fast and efficient. By simply adjusting the four simple parameters, the GPU dynamically computes infinite, smooth color transitions with zero memory overhead.

What's Next?

Now that this series is officially wrapped, I’m figuring out my next moves and would love to get your input on what would be interesting.

Two potential paths:

  • The Foundations Path: Diving into heavier math, like Signed Distance Fields (SDFs), raymarching, or vertex displacement.

  • The Applications Path: Building high-end UI/UX interactions, like mouse-driven liquid glass distortions, image warping, and procedural noise.

I'm open and will probably dive into both as time progresses. Hit reply and let me know which side you're itching to learn first!

Until next week!

Patt

Sign up for my newsletter for more creative juices!