Skip to content

Instantly share code, notes, and snippets.

@Cyanilux
Last active Jan 26, 2022
Embed
What would you like to do?
List of resources mostly related to Shaders and Unity ~ https://www.cyanilux.com/resources

Unity (Official)

{Unity, URP} URP Docs
{Unity, HDRP} HDRP Docs
{Unity, Shader Graph} Shader Graph Docs
{Unity, URP, HDRP, Shader Graph, VFX Graph} Rendering & Visual Effects Roadmap\

{Unity} Github > C# Reference
{Unity} Github > Graphics - SRP core, URP, HDRP, Shader Graph, etc.
{Unity} Github > URP ShaderLibrary
{Unity} Github > URP Shaders
{Unity} Github > URP Rendering Examples
{Unity} Github > BoatAttack Demo
{Unity} Github > BoatAttack Demo PlanarReflection.cs\

Unity Blog Articles

{Unity} Free VFX Image Sequences & Flipbooks (Nov 2016)
{Unity} Stripping Scriptable Shader Variants (May 2018)
{Unity} Custom Lighting in Shader Graph (July 2019)
{Unity} Normal map compositing using the surface gradient framework in Shader Graph (Nov 2019)\

Sites / Blogs

{Unity, BiRP, HLSL} Harry Alisavakis - Unity Shader Tutorials for Built-in RP. Weekly collections of tech art from twitter (Technically Art). ShaderQuest series
{Unity, BiRP, CustomSRP, HLSL, C#} Catlike Coding - Unity Shader & C# Tutorials for Built-in RP. Also has Custom SRP series.
{Unity, BiRP, HLSL, URP, Shader Graph} MinionsArt - Tutorials for Unity Built-in RP and Shader Graph (URP), as well as 3D Modelling & Texturing
{Unity, URP, Shader Graph, HLSL} Alexander Ameye
{Unreal, Unity, URP, Shader Graph} Joyrok
{Unity, URP} Euri Herasme - Not many tutorials/breakdowns yet but some cool shaders to look at
Simon Schreibt - Game Art Tricks, Design Tricks, etc
{Unity, BiRP, HLSL} Ben Golus
{GLSL} Inigo Quilez - GLSL
{Unity, BiRP, HLSL} Alan Zucconi - Various Tutorials, including Unity Shaders for Built-in RP
{Unity, BiRP, HLSL} Ronja - Unity Shader Tutorials for Built-in RP
{Unity, BiRP, HLSL} Linden Reid - Unity Shader Tutorials for Built-in RP
{Unity, BiRP, HLSL} Roystan - Unity Tutorials for Built-in RP
{Unity, URP, Shader Graph} Daniel Illet - Unity Shader Tutorials mostly for Shader Graph (URP)
{Unity, BiRP, AmplifySE} Inresin - A few Unity Shader Tutorials for Built-in RP (Amplify Shader Editor)
{Unity, BiRP, HLSL, Compute} Lexdev - A few Unity Shader Tutorials for Built-in RP, including Compute Shaders
{Unity, BiRP, HLSL} BruteForceGame
{Unity, BiRP, HLSL} Youtube > Makin' Stuff Look Good in Unity
{Unity, URP, Shader Graph, HLSL} Youtube > Ned Makes Games
{Unity, BiRP, HLSL} Youtube > Sebastian Lague
{Unity, BiRP, HLSL} Patreon > Team Dogpit (aka Xibanya)
{GLSL} The Book of Shaders - GLSL
{Unity, URP, Shader Graph, HLSL} Cyanilux - It's me!
{Unity} The Unity Library (Stelabouras) - Site of linked resources, similar to this page\

Introduction to Shaders & Shader Basics

{Unity, ShaderLab, HLSL} Intro to Shaders (Cyanilux)
{Unity, Shader Graph} Intro to Shader Graph (Cyanilux)
{Unity, ShaderLab, HLSL, Shader Graph, AmplifySE, Unreal} ShaderQuest (Harry Alisavakis) - Series of articles that goes through the basics of shaders/materials for multiple pipelines. Includes HLSL shader code and graph editors : Shader Graph, Amplify Shader Editor as well as Unreal Engine's material graph editor
{Unity, BiRP, ShaderLab, HLSL} Youtube (Freya Holmér) > Shaders for Gamedev Playlist - Detailed videos that go through the basics of shaders. Focuses on BiRP but still applies to HLSL in URP
{Unity, HLSL} Twitter (Freya Holmér) > Lerp, Inverse Lerp & Remap
{Unity, BiRP, ShaderLab, HLSL} A gentle introduction to shaders (Alan Zucconi)
{Unity, BiRP, HLSL} Shader Fundamentals (CatlikeCoding) - Also shows compiled shader code examples
World, View & Projection Transformation Matrices (CodingLabs) - Not for Unity specifically but general overview of different spaces commonly used in computer graphics
Coordinate Systems (Learn OpenGL) - Not for Unity specifically but general overview of different spaces commonly used in computer graphics (Object, World, View, Clip and Screen / Normalised Device Coordinates)\

Shader Code

{Unity, ShaderLab} Unity Docs > ShaderLab Reference
{Unity, HLSL} Shader Viewer (Built-in RP) (Xibanya)
{Unity, HLSL} Shader Viewer (URP) (Xibanya)
{Unity, URP, HLSL}Writing Shader Code in URP (Cyanilux, May 2021)
{Unity, URP, HLSL} Porting Shader Code from Built-in RP to LWRP (johnsietsma, Oct 2018)
{Unity, URP, HLSL} Github (Cyanilux) > URP Shader Code Templates
{Unity, URP, HLSL} Github (phi-lira) > URP Shader Examples
{Unity, URP, HLSL} Github Gist (phi-lira) > URP PBR Template
{Unity, URP, HLSL} Github (ColinLeung-NiloCat) > URP Toon Lit Shader Example
{Unity, URP, HLSL} Github (ColinLeung-NiloCat) > URP Surface Shader Solution
{Unity, ShaderLab} Github (totallyRonja) > Gradient Material Property Drawer - Material Property Drawer for [Gradient] shader code property attribute which lets you edit a texture as a gradient\

Shader Branching, Screenspace Derivatives, Mip-Mapping, Profiling & Optimisation

{Unity} Branching on a GPU (Jason Booth, Dec 2021) - Some tips about branching in shaders
{Unity, HLSL, Compute} Youtube (Jump Trajectory) > You Might Be Thinking About Shader Performance Wrong - GPU Memory, Latency Hiding, Texture Format, Mip-Mapping, Channel Packing, Shared Memory in Compute Shaders
{Unity, BiRP, HLSL} Sharper Mipmapping using Shader Based Supersampling (Ben Golus, Aug 2019) - Written for Built-in RP but can still be applied to HLSL in URP/HDRP
{Unity, BiRP, HLSL} Distinctive Derivative Differences (Ben Golus, Apr 2021) - Written for Built-in RP but can still be applied to HLSL in URP/HDRP
{Unity, BiRP, HLSL} Partial Derivatives (ddx, ddy, fwidth) (Ronja)\

Water

{Unity, URP, Shader Graph} Water Shader Breakdown (Cyanilux)
{Unity, URP, Shader Graph} Whirlpool Shader Breakdown (Cyanilux)
{Unity, URP, Shader Graph} Unity Asset Store (Alexander Ameye) > Stylized Water for URP (Free)
{Unity, Shader Graph} Shaders Done Quick - Stylized Water (Alexander Ameye)
{Unity, BiRP, HLSL} Interactive Water (MinionsArt)
{Unity, BiRP, HLSL} Quick Game Art Tips - Stylized Water (MinionsArt)
{Unity, BiRP, HLSL} Quick Game Art Tips - Waterfall (MinionsArt) - Also see improved waterfall
{Unity, URP, Shader Graph} Interactive Water - Shader Graph Version (MinionsArt)
{Unity, URP, Shader Graph} Liquid, Triplanar & Waterfall Shader Graphs (MinionsArt) - Also see improved waterfall\

Grass & Foliage

{Unity, BiRP, HLSL} Grass Geometry Shader (Roystan)
{Unity, URP, HLSL} Github (Cyanilux) > URP Grass Geometry Shader
{Unity, BiRP, AmplifySE} Youtube (Pontus Karlsson) > Fluffy Stylized Trees - Shader that converts quad based mesh to billboards. Also has Shader Graph screenshot in comments which may work for URP/HDRP
{Unity, URP, Shader Graph} Foliage Shader Breakdown (Cyanilux) - Generating foliage mesh from baking particle systems while editing normals to use normalised vertex positions to simulate normals of a sphere to achieve a soft shading\

Clouds & Skybox

{Unity, BiRP, AmplifySE} Clouds Shader Breakdown (AlexStrook) - Mesh based clouds with displacement from scrolling noise
{Unity, URP, Shader Graph} Clouds Shader Breakdown (Cyanilux) - Mesh/Plane based clouds with displacement from scrolling noise. Shader Graph
{Unity, URP, Shader Graph} Reaching for the Stars - Procedural Skybox (Jannik Boysen)
{Unity, BiRP, HLSL} Stylised Procedural Skybox Shader - For Built-in RP, though the shader is unlit and might still work in URP\

Parallax & Interior Mapping

{Unity, BiRP, HLSL} Parallax Shader Effects for Ice/Gems (MinionsArt)
{Unity, BiRP, HLSL} My take on shaders : Parallax effect (part 1) (Harry Alisavakis) - Also see part 2
{Unity, BiRP, HLSL} My take on shaders : Interior Mapping (Harry Alisavakis)
{Unity, BiRP, HLSL} Parallax Mapping (CatlikeCoding)
{GLSL} Parallax Occlusion Mapping in GLSL
{Unity, BiRP, AmplifySE} Ice Shader Parallax Effect (Loic Cayuela / cayou66)\

Depth

{Unity, HLSL, Shader Graph} Depth (Cyanilux) - A big post explaining everything about Depth : Depth Buffer, Depth Texture / Scene Depth node, SV_Depth, Reconstructing World Position from Depth, etc.\

Outlines

{Unity, HLSL} 5 ways to draw an outline (Alexander Ameye)
{Unity, URP, HLSL, Shader Graph} Edge detection outlines (Alexander Ameye) - Creating a Scriptable Render Feature to do a normals texture to apply Outlines / Edge Detection (Roberts Cross) either on object shaders or as a fullscreen image effect with an additional blit feature
{Unity, HLSL} The quest for very wide outlines (Ben Golus)
{Unity, BiRP, HLSL, C#} Youtube (Makin' Stuff Look Good) > Shader Case Study - Glowing Object Outlines - Tutorial making glowing object outlines as a fullscreen image effect through replacement shaders, blurring, and compositing result with main camera
{Unity, BiRP, HLSL} Outline Shader (Roystan) - Edge Detection (Roberts Cross), using Post Processing Stack V2
{Unity, URP, HLSL} Github (Unity) > Universal Rendering Examples - Outlines - Includes 'Inverted-Hull' style outline shader (ToonBasicOutline.shader) applied with RenderObjects feature or as a second material. Also includes an Edge Detection (Sobel) example via fullscreen image effect (SobelFilter.shader), applied with a blit feature (DrawFullscreenFeature.cs)
{Unity, URP, HLSL, Shader Graph} Youtube (NedMakesGames) > Outline Playlist - Youtube Playlist of various outline techniques, including Inverted-Hull and Edge Detection (Sobel) methods.
{Unity, URP, Shader Graph} Easy Outlines (Daniel Ilett) - Inverted-Hull style outlines in Shader Graph. Note the usage of double-sided rendering and alpha clipping front faces is more expensive than "Cull Front" used in shader code. Newer versions of Shader Graph (2021.2+) now have the ability to "Render Face : Back" in Graph Settings (meaning you'd then only need the vertex shifting part of the graph)
{Unity, BiRP, HLSL} Colored Outline Shader (Linden Reid) - Inverted-Hull style outlines that also sample character texture\

Lighting, Baked GI and Deferred

{Unity, URP} Youtube (Unity) > Harnessing Light with URP and the GPU Lightmapper (Unite Now 2020) - Understanding how lights and shadows work in URP. Learn how to set up a scenario with a mix of real-time shadows, Light Probes, and baked GI.
{Unity, BiRP} Deferred Shading (CatlikeCoding)
{Unity, BiRP} Shaders For People Who Don't Know How To : Deferred (Team Dogpit, aka Xibanya)
{HLSL} Rendering Line Lights - An article about implementing line-shaped lights

Vertex Displacement & Soft-body

{Unity, BiRP} Soft-body Shader (Crumble, BruteForceGame)
{Unity, URP, Shader Graph} Shader Graph Baked Rigidbody Animation using Vertex Animation Textures (Vadim, Sept 2019) - LWRP/URP\

Paint / Goop

{Unity} Bleeding Edge Effects on Mobile - Dynamic painting to UVs for 3D objects (3:27+). Soft-body Deformation (10:48+). Also a little gross. They are using LWRP/URP with a mix of HLSL and Shader Graph but technique isn't that pipeline-specific. Their C# side code also looks more like what you'd use in BiRP.
{Unity, URP} Splatoon's Ink System (Mix and Jam)
{Unity, URP, Shader Graph, HLSL, C#} Splatoon Painting Effect (TNTC) - Uses URP with a mix of HLSL and Shader Graph but technique isn't that pipeline-specific. Much of the C# side code and HLSL looks the same as what you'd use in BiRP too.\

Decals

{Unity, URP} Github (Kink3d) > kDecals - Projection Decals for URP
{Unity, URP, HLSL} Github (ColinLeung-NiloCat) > URP Unlit Screen Space Decal Shader
{Unity, URP, Shader Graph} Github (Harry-Heath) > URP Decal Node - Shader Graph node/subgraph that allows you to create custom decals\

Terrain

Terrain Blending

{Unity, BiRP, C#, AmplifySE} Blending Meshes into Terrain (Inresin)\

Fog of War

{Unity, BiRP, C#, Compute Shader, HLSL} Recreating Civ VI Fog of War Effect (Lexdev)\

Subsurface Scattering

{Unity, URP, HLSL} Fast Subsurface Scattering (John Austin, May 2020)\

Signed Distance Fields

Inigo Quilez > 3D SDF Functions
Inigo Quilez > 2D SDF Functions
{Unreal} Slime Rancher Faces : Behind the Scenes (PolygonCherub, Monomi Park)
{Unreal} Joyrok > What are SDFs Anyway?\

Raymarching

{Unity, BiRP, HLSL} Raymarching Distance Fields : Concepts and Implementation in Unity (Adrianb)
{Unity, URP, HLSL} Stained Glass - Volumetric Light Shafts (Euri Herasme)
{Unity, URP, C#, HLSL} Raymarched Volumetric Lighting in URP (Valerio Marty) - Also see Part 2, Coloring Light as it passes through Stained Glass
{Unreal, HLSL} Creating a Volumetric Ray Marcher\

Tessellation

{Unity, URP, HLSL} Basic Tessellation Setup for URP (MinionsArt)
{Unity, URP, HLSL} Youtube (NedMakesGames) > Mastering Tessellation - Detailed introduction to Tessellation for Shader Code (URP, but not that pipeline specific so may still be useful for BiRP and HDRP). Also alternative article version\

2D

{Unity, URP} Youtube (Unity) > URP 2D Pixel Perfect Lights & Particles\

Batching, GPU Instancing, DrawMeshInstanced & DrawMeshInstancedIndirect

{Unity} Unity Forums Answer (Ben Golus) - Brief description of each batching method (Dynamic, Static, GPU Instancing and SRP Batching) and their benefits
{Unity} Unity Docs > Draw call batching
{Unity, URP, HDRP, CustomSRP} Unity Docs > SRP Batcher
{Unity, BiRP, HLSL} Unity Docs > GPU Instancing
{Unity, BiRP, C#, HLSL, Compute Shader} Drawing Thousands of Meshes with DrawMeshInstanced / Indirect (Toqoz) - Good article that provides example C# and shader code for the usage of Graphics.DrawMeshInstanced(Indirect) to efficiently render thousands of meshes, also with a compute shader example to apply movement
{Unity, URP, C#, HLSL, Compute Shader} Github (ColinLeung-NiloCat) > URP Mobile DrawMeshInstancedIndirect Example\

Custom SRP

{Unity, CustomSRP} Github (phi-lira) > Custom SRP Template
{Unity, CustomSRP} Youtube (Unity) > Custom SRP & Graphics Workflows | Battle Planet - Judgement Day (Unite Copenhagen 2019)\

Other

{Unity, C#} Orbit Tessellation (Kerbal Space Program, Developer Insights #9)\

Shader Graph Tools & Custom Functions

{Unity, Shader Graph} Github (Cyanilux) > Shader Graph Variables - Adds Register Variable and Get Variable nodes to Shader Graph, allowing you to link sections of a graph without connection wires
{Unity, Shader Graph} Github (Cyanilux) > Shader Graph To PNG - Screenshots a Shader Graph in multiple sections, stitches them together and saves the result as a PNG.
{Unity, URP, Shader Graph} Github (Cyanilux) > URP Shader Graph Custom Lighting - Custom Functions & SubGraphs for Main & Additional Lights and Shadows. Works in an Unlit Graph.
{Unity, URP, Shader Graph} Github (ciro-unity) > BotW-ToonShader CustomLighting.hlsl - URP
{Unity, Shader Graph} Github (RemyUnity) > Shader Graph Node Library - Adds useful nodes, 3d noise functions
{Unity, Shader Graph} Shader Graph Custom Function Nodes Collection (Tim Coster, Sep 2020)\

Other Useful Github Repos/Gists

{Unity, URP} Github (Cyanilux) > URP Blit Renderer Feature
{Unity} Github Gist (Cyanilux) > Tex2DArray Creator - EditorWindow for creating & editing Texture 2D Arrays
{Unity, URP} Github (Kink3d) > kMirrors - Planar Reflections for URP
{Unity, URP, Shader Graph} Github (ryanslikesocool) > Mecanim2Texture - Bake Mecanim skinned mesh animations to 2D textures to be used in shaders (including Shader Graph nodes)
{Unity, BiRP, HLSL} Github (keijiro) > DepthInverseProjection - For Built-in RP w/ PPv2\

Procedural Generation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment