Gradient Morph

I wanted to learn more about shaders, and I also wanted to know more about creating plugins for figma, so why not try doing both.

I got inspired after watching this excellent stream by Yuri Artiukh.

A short explanation of how it works

The 3d scene contains a plane which consists of 256x256 verticies. We animate these verticies up and down using random noise and passed in options. the plane now looks like rolling waves instead of a flat plane.

If you use your mouse in the editor, you can tilt the camera and see how the waves roll over the plane.

By looping though the five colors we pass in as options we mix between them again using the Simplex Random Noise function, until output it to the fragment shader to be rendered.