Shader forge guide

Three looks

Each picture below was made in Shader forge from its presets. The table under each one lists the panel buttons pressed; the preset and the code change are in the text. The pictures move on the page, so yours will be a different moment.

Voronoi cells

Cells in blue, gold, brown and deep red, split by bright glowing cyan edges
The Voronoi cells preset with the code hidden.

Press Voronoi cells under Presets, then Preview only under View.

The code splits the frame into a 6 × 6 grid, puts one moving point in each square, and colours each pixel by its nearest point. Where two points are almost equally near, a bright edge glows.

SettingValue
ViewPreview only
PresetsVoronoi cells

To get bigger cells, change uv * 6.0 to uv * 3.0 in the code.

Raymarched sphere

A mint-green sphere with a white highlight on a flat grey floor under a dark slate sky, with a soft shadow at its lower right
The Raymarched sphere preset with the code hidden.

Press Raymarched sphere under Presets, then Preview only under View.

For each pixel the code sends a ray from a camera and steps along it, up to 80 times, until it touches the sphere or the floor. It then lights the spot and steps towards the light again for the soft shadow. See raymarching.

SettingValue
ViewPreview only
PresetsRaymarched sphere

To slow the camera, change iTime * 0.4 to iTime * 0.1.

Plasma, with finer bands

The Plasma code with line 11 changed, beside finer, tighter bands of pink, violet, cyan, yellow and green
The Plasma preset after one small code edit, with the code still showing.

Plasma is the preset the page opens with. Press Restart time, then in the code change vec2 p = uv * 8.0 - 4.0; to vec2 p = uv * 24.0 - 12.0;.

That spreads the frame over three times the range of p, so the sine waves repeat three times as often and the bands come out finer. Nothing else changes; the glow in the middle is iMouse, which starts at the centre.

SettingValue
PlaybackRestart time

Try iTime * 0.2 in place of iTime * 0.6 on the next line to slow it down.