Optimized Toon Outlines! One Texture For Depth and Normals Edge Detect ✔️ 2020.3 | Game Dev Tutorial @NedMakesGames
Optimized Toon Outlines! One Texture For Depth and Normals Edge Detect ✔️ 2020.3 | Game Dev Tutorial  @NedMakesGames
Uploaded February 2021 | Updated September 2026, 3 weeks ago
✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3

I've covered a lot of different types edge detection outlines built in Unity's Universal Render Pipeline Shader Graph. In this video, I take another look at per-object depth and normals outlines to further optimize them, obtaining depth and normals data from a single texture and decreasing texture reads. I also describe some ways to counter-act the loss of depth precision and keep quality as high as possible!

👋 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
► Edge Detection Outlines: youtu.be/RMt6DcaMxcE
► Depth Normals Outlines: youtu.be/fW-5srSHDMc
► Per-Object Outlines: youtu.be/74AS5DmLe8w

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

📜 Required scripts
► DepthNormalsFeature.cs: gist.github.com/NedMakesGames/360f900dc86120dda34cc831c823a78e
► OutlinesInclude.hlsl: gist.github.com/NedMakesGames/f5f62f9ff0fb5d3ac478430af16b3cdc
► DecodeDepthNormals.hlsl: gist.github.com/NedMakesGames/3cafdd89b68adb4c167767c4e99ecbf9

📚 Reference scripts
► OutlinesInclude.hlsl final: gist.github.com/NedMakesGames/a7a42f292b5575e9586d64c24313ac86

⏲️ Timestamps:
0:00 Intro
1:03 Theory
1:46 Project setup
2:42 OutlinesInclude
4:20 Outlines subgraph
8:25 Test graph
10:08 Adding to other graphs
10:39 Wrap up and credits

🎖️ Credits and references:
• Cyanilux: Depth - cyanilux.com/tutorials/depth/#buffer-vs-texture
• Erik Roystan Ross: Outline Shader - roystan.net/articles/outline-shader.html
• Alexander Ameye: Outlines 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/blob/master/Samples/UWP/D3D12PipelineStateCache/src/EdgeDetectPixelShader.hlsl
• Ben Golus, Keijiro Takahashi: View Direction from Screen UV - forum.unity.com/threads/help-with-view-space-normals.454248
• freepik: Wrinkled paper texture - freepik.com/premium-vector/wrinkled-paper-texture_711440.htm
• James "Nihilore" Opie: music "Moonlit Skyline" - youtube.com/watch?v=iyIjnbP6L2I
• Flytet: Great white shark - turbosquid.com/3d-models/free-big-shark-animation-3d-model/1113550
• Fruitgeoff: Underwater Scene | Folder Exam - Spring 2020 - sketchfab.com/3d-models/underwater-scene-folder-exam-spring-2020-99a3e1a8d5744aa3be9c4592e384acfb

#GameDev #IndieDev #Unity
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 PreviewGenerate a Mesh Asset Using Compute Shaders in the Unity Editor! ✔️ 2020.3 | Game Dev TutorialTerrain Section Templates! Tactical Lizard Tamer, Unity Game Dev Log [Part 148]Trampled Grass! Add Simple Interaction to Unity URP Shader Graph Grass ✔️ 2020.3 | Game Dev TutorialFinishing Up the Model! Tactical Lizard Tamer, Unity Game Dev Log [Part 101]
Ned Makes Games |

Optimized Toon Outlines! One Texture For Depth and Normals Edge Detect ✔️ 2020.3 | Game Dev Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER