Unity Shader Graph Basics (Part 10 - Custom Functions) @danielilett
Unity Shader Graph Basics (Part 10 - Custom Functions)  @danielilett
Uploaded July 2024 | Updated November 2026, 5 days ago
Unity only provides a Main Light Direction node for custom lighting. If we want more fine-tuned control and support for color and additional lights, we'll need to delve into the world of โœจcustom HLSL codeโœจ. With Shader Graph's Custom Function node, we unlock plenty of new opportunities!

I'm using Unity 2022.3.0f1, although these steps should look similar in previous and subsequent Unity versions.
------------------------------------------------------------------------
๐Ÿ‘‡ Download the project on GitHub: github.com/daniel-ilett/shader-graph-basics-2022-3
๐Ÿ“ฐ Read this tutorial in article format instead: danielilett.com/2024-07-09-tut7-14-intro-to-shader-graph-part-10

๐Ÿ’ก My CustomLighting.hlsl: github.com/daniel-ilett/shader-graph-basics-2022-3/blob/main/Assets/Shaders/CustomLighting.hlsl
๐Ÿ“ฆ Alex Lindman's CustomLighting.hlsl: github.com/Unity-Technologies/ShaderGraph-Custom-Lighting/blob/master/Assets/Includes/CustomLighting.hlsl
------------------------------------------------------------------------
โœจ Grab Snapshot Shaders Pro or Hologram Shaders Pro here (affiliate): assetstore.unity.com/publishers/42768?aid=1101lfDLn

๐Ÿ“š Get a copy of my shader book here (affiliate): dpbolvw.net/click-100742141-12898971?url=https%3A%2F%2Flink.springer.com%2Fbook%2F10.1007%2F978-1-4842-8652-4
------------------------------------------------------------------------
๐Ÿ’ฌ Join the Discord: discord.gg/tPQEUwPpb3
๐Ÿ’– Support me on Patreon: patreon.com/danielilett?fan_landing=true
โ˜• Or throw me a one-off coffee on Ko-fi: ko-fi.com/danielilett
------------------------------------------------------------------------
Unity Shader Graph Basics (Part 10 - Custom Functions)Retro Shaders Pro for Unity URP: Launch TrailerMaking Metal Gear Solids Stealth Camo in Shader GraphBuilding Quality Shaders: Depth and Stencils #unity #gamedev #madewithunityBuilding Quality Shaders: Tessellation, Geometry, and Compute Shaders #unity #gamedev #madewithunityEnergy Shield | CC0Shaders #gamedev #shadersHow Games Render Outlines #unity #gamedev #madewithunityVertex Displacement | Godot Shader Basics 03Retro Shaders Pro for Unity URP: Quick Start Guide[SerializeField] and [field:SerializeField] | Bytesize GamedevMaking Zelda: Breath of the Wild Stylised Grass in Unity URPUnity Shader Graph Basics (Part 4 - The Depth Buffer)
Daniel Ilett |

Unity Shader Graph Basics (Part 10 - Custom Functions)

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER