Ocean Shader

I made this shader in the Fall of 2019, using Unity 2019.2.0f1’s Shader Graph as part of my work for the project Jetpack Penguin. It uses voranoi noise to create a ripple effect and vertex displacement to create a wave effect.

Shader Graph

Vertex Displacement

Basically, what we’re doing here is we’re taking the y value of our object’s position, increasing it over time, and putting it into a sine function. Then we scale it by the amplitude of our waves and add that to the y-position so that the ocean moves up and down over time. At the top, we add a gradient noise to this so that we get a wave motion, instead of a flat plane moving up and down over time.

Ripple Effect

At the bottom we use voranoi noise, and apply a radial shear to it to get a sort of ripple effect. Then we use a power node to make the ripples thinner, and add our color to it so that it looks like water.

%d bloggers like this: