RSSAmplifier

Blog

Home on Cyanilux Shader Tutorials

Recent content in Home on Cyanilux Shader Tutorials

cyanilux.comRSS feed ↗40 posts

Latest posts

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.

Shoreline Shader Breakdown

A few water shader techniques I've used in the past for mapping ocean 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 (aka sun/light shafts, etc)

2D Water Shader Breakdown

A water shader intended for 2D, with pixelated highlights, distortion, reflections and simplified shoreline waves/ripples

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

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.

Custom Renderer Features

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!

Fractured Cube Breakdown

Uses a shader which displaces (scales/rotates) vertices of a prefractured mesh with pivots baked into UV maps

Swapping Colours

Examples of how to adjust/swap colours or colour palettes for a given texture/procedural input.

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

Writing Shader Code in Universal RP (v2)

Explains how shader code (ShaderLab & HLSL) is written to support the Universal RP

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

Intro to Shader Graph

A detailed introduction on how to use Unity Shader Graph! Graph setup, Data types, Understanding Previews, Properties, Keywords, Sub Graphs and more!

Crystal Shader Breakdown

An unlit/glowing crystal shader with a colour gradient based on object space Y position, and refraction via Scene Color node

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.

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

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

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.

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

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.

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

Polar Coordinates

A post explaining the Polar Coordinates node

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