Toon Outlines in Unity URP, Shader Graph Using Sobel Edge Detection! ✔️ 2020.3 | Game Dev Tutorial @NedMakesGames
Toon Outlines in Unity URP, Shader Graph Using Sobel Edge Detection! ✔️ 2020.3 | Game Dev Tutorial  @NedMakesGames
Uploaded December 2020 | Updated September 2026, 3 weeks ago
✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3
🩹 Fixes
► I made an editing mistake around 1:30. Please note, you need to place the outline material into the material field of the BlitMaterialFeature. It should not be empty after this step. Sorry about that!
► At line 35 in EdgeDetectionOutlinesInclude.hlsl, the sixth entry in sobelSamplePoints should be float2(1, 0), not float2(1, 1)
For 2020.2:
► When you create a shader graph, set the material setting to "Unlit"
► The gear menu on Custom Function nodes is now in the graph inspector
► Editing properties must be done in the graph inspector instead of the blackboard

Outlines are a great way to add polish and style to a variety of games! In this tutorial, I show how to implement sobel edge detection outlines in Unity Universal Render Pipeline using a combination of a shader graph and a renderer feature. These outlines affect the entire screen, do not change based on perspective, and can accentuate changes in color!

👋 Subscribe for weekly game development videos!
youtube.com/c/nedmakesgames?sub_confirmation=1

👑 Join my Patreon for extra influence over topics, early access to videos, and downloadable project files!
► patreon.com/nedmakesgames

🔗 Check out my website for a searchable list of tutorials!
► nedmakesgames.github.io

🔴 Twitch ► twitch.tv/nedmakesgames
🐦 Twitter ► twitter.com/nedmakesgames
🎮 Discord ► discordapp.com/invite/ubxSVBK
📸 Instagram ► instagram.com/nedmakesgames
👽 Reddit ► reddit.com/u/nedmakesgames
🎶 TikTok ► tiktok.com/@nedmakesgames
☕ Ko-fi ► ko-fi.com/nedmakesgames

🎬 Previous videos
► Hull outlines: youtu.be/1QPA3s0S3Oo
► Introduction to renderer features: youtu.be/MLl4yzaYMBY and youtu.be/6Yg2EedqDhc

✨ Follow up videos
► Depth normals outlines: youtu.be/fW-5srSHDMc
► Single object outlines: youtu.be/74AS5DmLe8w
► Optimized outlines: youtu.be/8Xq7tU5QN1Q

📜 Required scripts
► BlitMaterialFeature.cs: github.com/NedMakesGames/RendererFeatureBlitMat/blob/master/Assets/Rendering/Desaturate/BlitMaterialFeature.cs

📚 Reference scripts
► Depth only: gist.github.com/NedMakesGames/ce127e6bcad7e827ff9f4c22f04dc48f
► Final: gist.github.com/NedMakesGames/b6dfbd9b48a27e23265cf70bb86b8c6a

⏲️ Timestamps:
0:00 Intro
0:40 Project setup
1:35 Depth edge detection
8:05 Color edge detection
10:45 Wrap up and credits

🎖️ Credits and references:
• Microsoft: DirectX-Graphics-Samples - github.com/microsoft/DirectX-Graphics-Samples
• Hanane Rami, Mohammed Hamri and Lhoussiene Masmoudi: Color Edge Detector with Sobel - https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.402.6975&rep=rep1&type=pdf
• Unity Technologies: Universal Rendering Examples - github.com/Unity-Technologies/UniversalRenderingExamples
• Alex Ameye: Outline Shader - alexanderameye.github.io/outlineshader.html
• polyperfect: Low Poly Ultimate Pack - assetstore.unity.com/packages/3d/props/low-poly-ultimate-pack-54733
• freepik: Wrinkled Paper Texture - freepik.com/premium-vector/wrinkled-paper-texture_711440.htm
• M_Studios: Flower Vase - turbosquid.com/3d-models/free-flower-vase-3d-model/1031039
• Visager: music "In the Branches [Loop]" - freemusicarchive.org/music/Visager/Songs_from_an_Unmade_Forest_World/In_the_Branches_Loop

#GameDev #IndieDev #Unity
Toon Outlines in Unity URP, Shader Graph Using Sobel Edge Detection! ✔️ 2020.3 | Game Dev TutorialMovement Animations! Tactical Lizard Tamer, Unity Game Dev Log [Part 109]Entity-Based Terrain Mesh! Tactical Lizard Tamer, Unity Game Dev Log [Part 133]Game Over Transitions! Mazoid, Unity Game Dev Log [Part 2]Smooth Terrain Lighting! Tactical Lizard Tamer, Unity Game Dev Log [Part 129]Tile-based Terrain Textures! Tactical Lizard Tamer, Unity Game Dev Log [Part 143]Our First IJob! Twitch Concentration, Unity Game Dev Log [Part 3]A Simple Title Screen! Tactical Lizard Tamer, Unity Game Dev Log [Part 173]Introducing Data-Oriented Programming! Twitch Concentration, Unity Game Dev Log [Part 2]Experimenting with a Sparkle Shader! Unity Game Dev Log [VFX Thursday]Stylized Grass in Unity URP! Compute Shaders, Layered Mesh, and Clip! ✔️ 2020.3 | Game Dev TutorialReworking Clients! Tactical Lizard Tamer, Unity Game Dev Log [Part 181]
Ned Makes Games |

Toon Outlines in Unity URP, Shader Graph Using Sobel Edge Detection! ✔️ 2020.3 | Game Dev Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER