Outlines on One Object in Unity URP Shader Graph with Edge Detection! ✔️ 2020.3 | Game Dev Tutorial @NedMakesGames
Outlines on One Object in Unity URP Shader Graph with Edge Detection! ✔️ 2020.3 | Game Dev Tutorial  @NedMakesGames
Uploaded January 2021 | Updated November 2026, 1 day ago
✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3 🩹 Fixes:
► At line 39 in OutlinesInclude.hlsl, the sixth entry in sobelSamplePoints should be float2(1, 0), not float2(1, 1)

Outlines are a great way to add polish and style to a variety of games! In this tutorial, I apply depth and normal outlines to single objects, allowing different outline colors. This technique also skips the post processing step, which can be a big performance boost for lightweight platforms!

👋 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

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

🎬 Previous videos
► Depth and color outlines: youtu.be/RMt6DcaMxcE
► Normal outlines: youtu.be/fW-5srSHDMc

✨Follow up videos
► Optimized outlines: youtu.be/8Xq7tU5QN1Q

💬 Video transcript
► docs.google.com/document/d/1YrGlu2uVrZbAXszXPYMENxUCe_MemZwRDHsuCG8rN64/edit?usp=sharing

📜 Required scripts
► DepthNormalsFeature.cs: gist.github.com/NedMakesGames/660ea67339e5426c578ca244b58d83bf
► OutlinesInclude.hlsl: gist.github.com/NedMakesGames/9d433cce7575d8d776da789f29905306
► DecodeDepthNormals.hlsl: gist.github.com/NedMakesGames/043a4f0c2e894217fb9b9d4c2ac270f8
► BlitMaterialFeature.cs: github.com/NedMakesGames/RendererFeatureBlitMat/blob/master/Assets/Rendering/Desaturate/BlitMaterialFeature.cs

⏲️ Timestamps:
0:00 Intro
1:00 Theory
2:06 Project Setup
2:53 Outlines graph
5:49 Simple outlined shader
7:19 Outlines in unlit graphs
7:30 Outlines in lit graphs
9:35 Conflict with AO
9:57 Wrap up and credits

🎖️ Credits and references:
• PolyChromic: Toon Mushrooms - sketchfab.com/3d-models/toon-mushrooms-d55aae0bfdd8424cb4f7f7573a79f009
• Cyanilux: Depth - cyanilux.com/tutorials/depth/#buffer-vs-texture
• Roystan: Outline Shader - roystan.net/articles/outline-shader.html
• Alexander Ameye: Outline Shader - alexanderameye.github.io/outlineshader.html
• Hanane Rami, Mohammed Hamri, Lhoussiene Masmoudi: Color Edge Detector with Sobel-PCA - https://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.402.6975&rep=rep1&type=pdf
• Microsoft: DirectX Graphics Samples - github.com/microsoft/DirectX-Graphics-Samples
• Ben Golus and Keijiro Takahashi: View direction from screen position - forum.unity.com/threads/help-with-view-space-normals.454248
• James Opie AKA Nihilore: music "The Author Never Dies" - youtube.com/watch?v=Pm2QnPztgzY
• freepik: Wrinkled paper texture - freepik.com/premium-vector/wrinkled-paper-texture_711440.htm

#GameDev #IndieDev #Unity
Outlines on One Object in Unity URP Shader Graph with Edge Detection! ✔️ 2020.3 | Game Dev TutorialGeometry Shaders Made Easy In Unity URP! For Those New to Shaders! ✔️ 2020.3 | Game Dev TutorialErrors and Time Outs! Tactical Lizard Tamer, Unity Game Dev Log [Part 164]Reacting to UI Input! Tactical Lizard Tamer, Unity Game Dev Log [Part 176]Optimized Toon Outlines! One Texture For Depth and Normals Edge Detect ✔️ 2020.3 | Game Dev TutorialMouse Pointer in Screen and World Space #Shorts Tutorial Teaser! Mouse Picking in Unity! | Game DevNew Terrain in the Game! Tactical Lizard Tamer, Unity Game Dev Log [Part 168]Planning for Users! Twitch Concentration, Unity Entities Game Dev Log [Part 12]Feet, Toes, and Claws! Tactical Lizard Tamer, Unity Game Dev Log [Part 100]Terrain Occlusion Shadows! Tactical Lizard Tamer, Unity Game Dev Log [Part 136]Basics of Mipmaps in Unity! Import Settings and Custom Mipmaps! #Shorts Teaser | Game Dev TutorialMastering Tessellation Shaders in Unity! Easy LoD, Curved Triangles, Height Maps | Game Dev Preview
Ned Makes Games |

Outlines on One Object in Unity URP Shader Graph with Edge Detection! ✔️ 2020.3 | Game Dev Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER