Contents
Most of the tutorials below are for the Universal Render Pipeline (URP), but content may still work in other pipelines, such as the Built-in Render Pipeline (BiRP) and High Definition Render Pipeline (HDRP). It may need adjusting in some places due to HDRP using Camera-Relative rendering which makes World space relative to the camera position (e.g. try using Absolute World spaces instead).
Sections :
Looking for a place to start? Check out my Intro to Shaders and Intro to Shader Graph posts!
Resources / Editor Tools :
- Shader Graph Custom Lighting Functions/SubGraphs (URP)
- Improved Blit Render Feature (URP)
- Shader Graph To PNG
- Shader Graph Variables (+ coloured groups, swap hotkey, add node hotkeys)
- Bake Shader to Texture (Blit or Mesh UV)
If you have shader related questions, can join and post in my discord (button below). Also if you found this site useful, consider sharing a link with others or donating!
Tutorial Posts
(Posts explaining general shader-related topics or shader graph nodes.)
Local UVs for Sprites in Sprite Sheet/Atlas
A small post explaining how to convert the UVs of a sprite sheet (or sprites packed in an atlas) into local 0-1 coordinates across each sprite in the shader
Custom Renderer Features
Goes through examples of Renderer Features and explains how to write Custom Renderer Features and Scriptable Render Passes for Universal RP
Swapping Colours
Examples of how to adjust/swap colours or colour palettes for a given texture/procedural input.
Writing Shader Code in Universal RP (v2)
Explains how shader code (ShaderLab & HLSL) is written to support the Universal RP
Intro to Shader Graph
A detailed introduction on how to use Unity Shader Graph (updated for v12+)! Graph setup, Data types, Understanding Previews, Properties, Keywords, Sub Graphs and more!
Intro to the Shader Pipeline
An introduction to what a Mesh, Shader and Material is in Unity, how to set Shader Properties from C#, various types of Batching, and a brief look at Forward, Forward+ and Deferred rendering paths
Depth
A big post explaining everything about Depth : Depth Buffer, Depth Texture / Scene Depth node, SV_Depth, Reconstructing World Position from Depth, etc.
Vertex Displacement
A post explaining how to move vertices in Shader Graph, providing examples such as swaying grass and animated fish and butterflies. Also includes info about recalculating normal vectors.
I also have some older content on my Wordpress blog, such as :
- Orthographic Depth (mentioned in the Depth post above too)
- Passing Particle System Data into Shader Graph
- Post Processing in URP
- UV-Based Nodes
- Voronoi
- Worldspace UVs & Triplanar Mapping
Tutorial Breakdowns
(Tutorials breaking down how to create specific shader effects)
Shoreline Shader Breakdown
A few shader techniques I've used in the past for mapping waves crashing into the shore/beach & leaving behind wet sand
Sun Beams / God Rays Shader Breakdown
Using billboarded quads (or particles) to produce a god rays effect
2D Water Shader Breakdown
A water shader intended for 2D, with pixelated highlights, distortion, reflections and simplified shoreline waves/ripples
Ultraviolet Lights & Invisible Ink
Examples for revealing invisible objects (especially decals, such as fingerprints or hidden messages) based on lights, stencils and other masking methods
Book (w/ Turnable Pages) Breakdown
A book with pages that flip/turn via vertex displacement, and selects a portion of a texture containing all pages.
Rain Effects Breakdown
A few rain effects, including particles setup, and shaders for ripples in water/puddles and rain interacting with surfaces
Waterfall Shader Breakdown
A waterfall shader that interacts with a sphere to part the flowing water. Uses a signed distance field and alpha clipping.
Fractured Cube Breakdown
Uses a shader which displaces (scales/rotates) vertices of a prefractured mesh with pivots baked into UV maps
Snowglobe Breakdown
Glass globe shader with background refraction & reflection. Particles are contained inside which inherit Rigidbody movements.
Tentacle Shader Breakdown
A shader that uses vertex displacement to simulate a tentacle grabbing / wrapping around an object
Tornado Shader Breakdown
A shader applied to a few layers of alpha-clipped scrolling noise, with vertex displacement to make it wobble
Sword Slash Shader Breakdown
A shader applied to a ring mesh that pans a texture along it to create a swipe/slash effect
Holofoil Card Shader Breakdown
A shader that replicates the Holographic Foil effects on Trading Cards. Also explains the stencil shader effect on the card window.
Soft Foliage Shader Breakdown
Soft shaded foliage shader that uses alpha clipping with foliage texture and a small amount of vertex displacement to simulate wind. Applied to a mesh consisting of intersecting quads generated from a particle system
Crystal Shader Breakdown
An unlit/glowing crystal shader with a colour gradient based on object space Y position, and refraction via Scene Color node
Fire/Flame Shader Breakdown
A shader which distorts the UVs with noise for sampling a fire texture or shape generated using ellipse nodes
Sprite Glow/Outline Shader Breakdown
A shader which uses a signed distance field stored in the sprite texture's alpha channel to create an outline/glow (and inner-glow) effect, with control over the colour and thickness
Sprite Stencil Overlay Breakdown
An example of using the RenderObjects feature on the Forward Renderer to produce an overlay effect for sprites (not compatible with the 2D renderer)
Dissolve Shader Breakdown
A shader which uses noise and step functions to discard pixels to create a dissolving effect. Also provides examples for dissolving based on height / Y and using view space position as UVs to avoid seams
Toon Glass Shader Breakdown
A shader which produces solid diagonal lines across a quad's surface that moves with the camera position to simulate toon-like glass reflections
Fog Plane Shader Breakdown
Two examples of vertical fog effects produced using the depth texture (scene depth)
Cloud Shader Breakdown
A shader applied to a flat subdivided plane where vertices are offset vertically based on layered noise, moving at different rates, to create a cloud effect. Also uses scene depth to produce a softer transition with intersecting game objects
Forcefield Shader Breakdown
A forcefield shader using fresnel effect for glowing edges, scene depth for object intersections and scene colour to produce ripples/distortion
Forcefield Shader Breakdown (Simple)
A simple version of a forcefield shader, using fresnel effect for glowing edges and scene depth for intersections with objects in the scene
Jellyfish Shader Breakdown
A shader that displaces vertices based on sine waves in order to animate a Jellyfish mesh
Water Shader Breakdown
A water shader that uses the scene color to produce distortion/refractions and reconstructs a position from the scene depth to project caustics on underwater objects
Whirlpool Shader Breakdown
A shader that uses polar coordinates to offset vertices as well as sample a seamless noise texture to create a swirling effect
Hologram Shader Breakdown
A hologram shader based on sine/fraction nodes to produce repeating horizontal lines and fresnel effect, with optional distortion and glitching effects
Portal Shader Breakdown
A portal/wormhole shader on manipulating polar coordinates to create a spiralling effect
Liquid Shader Breakdown
A shader that discards pixels above a certain Y position and renders back faces to fake the top surface of the liquid
I also have a couple breakdowns that I haven’t copied over yet on my Wordpress blog :
Twitter Threads
(This mostly just helps me keep track of stuff, but some might have info/graphs shared in comments!)
2024
- Shoreline Shader Redux (breakdown above)
- Light/God Rays (breakdown above)
- Topdown 2.5D Water (breakdown above)
2023
- Grimoire/Spellbook (breakdown above)
- Rain (breakdown above)
- Tea (fluid sim experiment)
- Fractured Forcefield (kinda combining Fractured Cube & Forcefield breakdowns)
- Fractured Ground & Beam
- Fractured Cube (breakdown above)
- Ocean sunrise/set
- Revisiting Skybox Clouds
- Koi Pond
- Procedural Fish Scales
- Vines (Blender Geometry Nodes)
- Lightning
2022
- Snowglobe (breakdown above)
- Waterline (camera half-underwater effect)
- Dithered & Pixelated Lighting
- Ink Decal Experiments
- Ocean Water shader using Gerstner Waves
- Glitch (effect based on Horizon Zero Dawn’s focus highlights)
- Depth-based Shoreline Shader Mini Breakdown
- Sand Castle
- Parallax-based Hole in Quad
- Ghibli-inspired Fried Eggs & Bacon
- Grassy Scene
- Tentacle (breakdown above)
- Aurora
- Tornado (breakdown above)
2021
- Sword Slash (breakdown above)
- Stained Glass
- DrawMeshInstancedIndirect Grass via in Shader Graph (also see related post in FAQ)
- Paper Lanterns
- Potion Shader
- Anisotropic Hair Shader
- Sun/Stars (space/celestial theme)
- Trading Card Holographic Foil (breakdown above)
- GPU Instancing in Shader Graph
- Rainy Window Shader
- Water Reflections
- Terrain Blending
- Mario Sunshine Goop (2D/Planar)
- Mario Sunshine Goop (3D), Based on this video
2020
- Soft Foliage Shader (breakdown above)
- Resizable Dashed Arrow
- Procedural Skybox Clouds
- Procedural Skybox Moon Phases
- Replicating Quantum Conundrum’s Dimension-Switching effect
- Post Processing based Water
- Terrain Splatmap in Shader Graph
- Grass Geometry Shader & Github
- Animal Crossing Shoreline Shader Mini Breakdown (if you don’t have twitter, see thread unroll)
- Animal Crossing Style World Bending
- Colour Picker
2019
- Depth Mask Boat (& Render Texture Foam Trails)
- Waterfall Shader (With sphere interaction, breakdown above)
- Impossible Cube (Stencil shader effects)
- Fireball sphere (Particle System, Dissolve based on noise & Fresnel effect)
- SDF Pumpkin
- Melting Candles
- Render Texture Puddles
- Ice Shader
- Interior Mapping
- Hourglass (Taking the Liquid Shader further)
- Alien Rune Cube
- Lava (Flowmap, also see FAQ example)
- Lava Bubbles (Particle System with bubble mesh, Dissolve based on lifetime)
Other
Jams
- (April 2023) 2 Technical 2 Jam Game - Yin Yang, Twitter post
- (April 2022) Technically A Jam Game Game - Dungeon, Twitter thread & All submissions
- (April 2021) Ludum Dare 48 (Deeper and deeper) Game - Dig Deeper & Twitter thread
Projects / Experiments
- Slime/Jelly Softbody (coded in C#, using spring-mass model and trilinear interpolation)
- Character controller test side project
- Recursion (A first person puzzle game. Stopped working on it, but may revisit at some point?)
- Gifs : Early Showoff, Recursive Portals
- Cards hand controller (& github)
Procedural Generation
Misc
- YAGPDB Custom Commands for theme suggestion (made for Technically Speaking discord)
- To Do (A simple in-editor to-do list for Unity, attached to a GameObject as a component)