Voronoi-based Lava in Unity Shader Graph @danielilett
Voronoi-based Lava in Unity Shader Graph  @danielilett
Uploaded June 2023 | Updated September 2026, 2 weeks ago
Voronoi diagrams are great for modelling natural shapes like biological cells, and they also excel at creating lava that flows between chunks of rock. Shader Graph's built-in Voronoi node doesn't provide enough information about the edges of the 'cells', so we'll have to write custom code, which I'm basing on Inigo Quilez's great examples. With a custom function node, we can then build a customizable lava effect with different textures, thicknesses, and most importantly, wiggle.

I'm using Unity 2022.3.0f1, although this technique will work in previous (and presumably subsequent) versions of Unity.
------------------------------------------------------------------------
👇 Download the project on GitHub: github.com/daniel-ilett/shaders-stylised-lava

📰 Read this tutorial in article format instead: danielilett.com/2023-06-20-tut7-2-voronoi-lava

🌐 Read Inigo's article about Voronoi edges: iquilezles.org/articles/voronoilines
------------------------------------------------------------------------
📚 Get a copy of my shader book here (affiliate): dpbolvw.net/click-100742141-12898971?url=https%3A%2F%2Flink.springer.com%2Fbook%2F10.1007%2F978-1-4842-8652-4

✨ Grab my Snapshot Shaders Pro package here (affiliate): assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/snapshot-shaders-pro-for-urp-hdrp-160556?aid=1101lfDLn

✨ Grab my Hologram Shaders Pro package here (affiliate): assetstore.unity.com/packages/vfx/shaders/hologram-shaders-pro-for-urp-hdrp-built-in-246720?aid=1101lfDLn
------------------------------------------------------------------------
🌐 AmbientCG Textures: ambientcg.com/view?id=Rock028 and ambientcg.com/view?id=Lava004
------------------------------------------------------------------------
💬 Join the Discord: discord.gg/tPQEUwPpb3
💖 Support me on Patreon: patreon.com/danielilett?fan_landing=true
☕ Or throw me a one-off coffee on Ko-fi: ko-fi.com/danielilett
------------------------------------------------------------------------

00:00 Intro
00:34 The Voronoi Function
02:15 CustomVoronoi.hlsl
04:28 Custom Functions
05:18 Rock Islands
07:11 Lava Wiggle
08:38 Rock Colors
09:37 Lava Colors
10:43 Rock Normals
11:49 Lava Material
12:07 Outro

#gamedev #shaders #madewithunity
Voronoi-based Lava in Unity Shader GraphUnity Shader Graph Basics (Part 11 - Terrains)Building Quality Shaders: Your First Shader #unity #gamedev #madewithunityOutlines in Shader Graph | Bytesize GamedevMesh Explosion in Shader Graph | Bytesize GamedevHow to Make Your First Shader Graph | Unity BasicsSix Grass Rendering Techniques in UnityWrite Your Very First C# Script | Unity Basics10 Shaders in 10 Minutes - Unity Shader GraphBuilding Quality Shaders: Transparency and Dithering #unity #gamedev #madewithunityMore Holograms in Unity Shader GraphHolograms in Unity Shader Graph
Daniel Ilett |

Voronoi-based Lava in Unity Shader Graph

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER