Cyanilux

Game Dev Blog & Tutorials

Contents

Most of the tutorials below are for the Universal Render Pipeline (URP), but content may still work in the High Definition Render Pipeline (HDRP) too. It may need adjusting in some places due to HDRP using Camera-Relative rendering which makes World space relative to the camera position. Also note that the View Direction node is normalised in HDRP but not in URP.

Sections :

Resources :

If you have any comments, questions or suggestions you can drop me a tweet or join my discord. If you found this site useful, please share a link with others!


Tutorial Breakdowns

(Tutorials breaking down how to create specific shader effects)

Still working on copying content from my old Wordpress blog. Sorry! For now you can find the following breakdowns there :

Crystal Shader Breakdown

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

URP
Shader Graph

Fire Shader Breakdown

A shader which distorts the UVs with noise for sampling a fire texture or shape generated using ellipse nodes

URP
Shader Graph

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

URP
Shader Graph

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)

URP
Shader Graph

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

URP
Shader Graph

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

URP
Shader Graph

Fog Plane Shader Breakdown

Two examples of vertical fog effects produced using the depth texture (scene depth)

URP
Shader Graph

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

URP
Shader Graph

Forcefield Shader Breakdown

A forcefield shader using fresnel effect for glowing edges, scene depth for object intersections and scene colour to produce ripples/distortion

URP
Shader Graph

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

URP
Shader Graph

Jellyfish Shader Breakdown

A shader that displaces vertices based on sine waves in order to animate a Jellyfish mesh

URP
Shader Graph

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

URP
Shader Graph

Whirlpool Shader Breakdown

A shader that discards pixels above a certain Y position and renders back faces to fake the top surface of the liquid

URP
Shader Graph

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

URP
Shader Graph

Portal Shader Breakdown

A portal/wormhole shader on manipulating polar coordinates to create a spiralling effect

URP
Shader Graph

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

URP
Shader Graph

Tutorial Posts

(Posts explaining general shader-related topics or shader graph nodes.)

Intro to Shaders

An introduction to what a Mesh, Shader and Material is in Unity, how to set Shader Properties from C#, a brief look at Forward vs Deferred rendering and some information about Material instances and Batching

HLSL

Depth

A big post explaining everything about Depth : Depth Buffer, Depth Texture / Scene Depth node, SV_Depth, Reconstructing World Position from Depth, etc.

Shader Graph
HLSL

Vertex Displacement

A post explaining how to move vertices in Shader Graph, providing examples such as swaying grass and animated fish and butterflies

Shader Graph

Polar Coordinates

A post explaining the Polar Coordinates node

Shader Graph

Also still working on copying content from my old Wordpress blog, Sorry! You might be able to find some more stuff there, mainly :


Twitter Threads

(Links to shader-related twitter threads that I’ve made. I haven’t turned any of these into proper posts/breakdowns but they might still be useful!)


License / Usage Cookies & Privacy