GPU Instanced Grass Breakdown
A post showing how Shader Graph can be used with DrawMeshInstancedProcedural / RenderMeshPrimitives and DrawMeshInstancedIndirect / RenderMeshIndirect to draw grass using GPU Instancing.
Recent content in Home on Cyanilux Shader Tutorials
A post showing how Shader Graph can be used with DrawMeshInstancedProcedural / RenderMeshPrimitives and DrawMeshInstancedIndirect / RenderMeshIndirect to draw grass using GPU Instancing.
A few water shader techniques I've used in the past for mapping ocean waves crashing into the shore/beach & leaving behind wet sand
Using billboarded quads (or particles) to produce a god rays effect (aka sun/light shafts, etc)
A water shader intended for 2D, with pixelated highlights, distortion, reflections and simplified shoreline waves/ripples
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
Examples for revealing invisible objects (especially decals, such as fingerprints or hidden messages) based on lights, stencils and other masking methods
A book with pages that flip/turn via vertex displacement, and selects a portion of a texture containing all pages.
A few rain effects, including particles setup, and shaders for ripples in water/puddles and rain interacting with surfaces
A waterfall shader that interacts with a sphere to part the flowing water. Uses a signed distance field and alpha clipping.
Goes through examples of Renderer Features and explains how to write Custom Renderer Features and Scriptable Render Passes for Universal RP. Mostly focuses on Unity 2022, but now also provides some snippets for newer versions!
Uses a shader which displaces (scales/rotates) vertices of a prefractured mesh with pivots baked into UV maps
Examples of how to adjust/swap colours or colour palettes for a given texture/procedural input.
Glass globe shader with background refraction & reflection. Particles are contained inside which inherit Rigidbody movements.
A shader that uses vertex displacement to simulate a tentacle grabbing / wrapping around an object
A shader applied to a few layers of alpha-clipped scrolling noise, with vertex displacement to make it wobble
A shader applied to a ring mesh that pans a texture along it to create a swipe/slash effect
Explains how shader code (ShaderLab & HLSL) is written to support the Universal RP
A shader that replicates the Holographic Foil effects on Trading Cards. Also explains the stencil shader effect on the card window.
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
A detailed introduction on how to use Unity Shader Graph! Graph setup, Data types, Understanding Previews, Properties, Keywords, Sub Graphs and more!
An unlit/glowing crystal shader with a colour gradient based on object space Y position, and refraction via Scene Color node
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
A big post explaining everything about Depth : Depth Buffer, Depth Texture / Scene Depth node, SV_Depth, Reconstructing World Position from Depth, etc.
A shader which distorts the UVs with noise for sampling a fire texture or shape generated using ellipse nodes
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
An example of using the RenderObjects feature on the Forward Renderer to produce an overlay effect for sprites
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
A shader which produces solid diagonal lines across a quad's surface that moves with the camera position to simulate toon-like glass reflections
Examples of fog plane effects produced using the depth texture (scene depth), commonly used to create vertical fog or fake darkness/light for entrances and exits in third person games.
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
A forcefield shader using fresnel effect for glowing edges, scene depth for object intersections and scene colour to produce ripples/distortion
A simple version of a forcefield shader, using fresnel effect for glowing edges and scene depth for intersections with objects in the scene
A shader that displaces vertices based on sine waves in order to animate a Jellyfish mesh
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.
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
A shader that uses polar coordinates to offset vertices as well as sample a seamless noise texture to create a swirling effect
A hologram shader based on sine/fraction nodes to produce repeating horizontal lines and fresnel effect, with optional distortion and glitching effects
A post explaining the Polar Coordinates node
A portal/wormhole shader on manipulating polar coordinates to create a spiralling effect
A shader that discards pixels above a certain Y position and renders back faces to fake the top surface of the liquid