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
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.
| Setting | Value |
|---|---|
| View | Preview only |
| Presets | Voronoi cells |
To get bigger cells, change uv * 6.0 to uv * 3.0 in the code.
Raymarched sphere
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.
| Setting | Value |
|---|---|
| View | Preview only |
| Presets | Raymarched sphere |
To slow the camera, change iTime * 0.4 to iTime * 0.1.
Plasma, with finer bands
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.
| Setting | Value |
|---|---|
| Playback | Restart time |
Try iTime * 0.2 in place of iTime * 0.6 on the next line to slow it down.