Hull Outline Shader in Unity URP Using Renderer Features and Culling! ✔️ 2020.3 | Game Dev Tutorial

Опубликовано: 28 Апрель 2026
на канале: Ned Makes Games
54,579
1k

✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3 🩹 Fixes:
► If importing a model, be sure to enable read/write access in the asset inspector, so the normal calculator script can read it's data correctly.

Outlines are a fun technique to add style to your game and pair perfectly with toon shaders. There are a variety of ways to implement them, and in this video, I look at one of them. I use a renderer feature to render a mesh twice, extruding the "hull" to create an outline. In the process, I write a script to handle sharp corners.

👋 Subscribe for weekly game development videos!
https://www.youtube.com/c/nedmakesgam...

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

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

🔴 Twitch ►   / nedmakesgames  
🐦 Twitter ►   / nedmakesgames  
🎮 Discord ► https://discordapp.com/invite/ubxSVBK
📸 Instagram ►   / nedmakesgames  
👽 Reddit ►   / nedmakesgames  
🎶 TikTok ►   / nedmakesgames  
☕ Ko-fi ► https://ko-fi.com/nedmakesgames

🎬 Previous videos
► Toon shading tutorial:    • Toon Shader in Unity Using a Shader Graph ...  
► Code shader basics:    • Geometry Shaders Made Easy In Unity URP! F...  

✨Follow up videos
► Edge detection outlines:    • Toon Outlines in Unity URP, Shader Graph U...  

📚 Reference scripts
These links include all code used at a certain stage of the project. Be sure to separate scripts into the correct files!
► Base shader: https://gist.github.com/NedMakesGames...
► Sharp corner handling: https://gist.github.com/NedMakesGames...
► Final: https://gist.github.com/NedMakesGames...

⏲️ Timestamps:
0:00 Intro
0:37 Theory
1:16 Project setup
2:25 The base shader
3:46 Sharp corner handling
5:25 Depth offset
6:02 Wrap up and credits

🎖️ Credits and references:
• Unity Technologies: URP examples - https://github.com/Unity-Technologies...
• Doug Valenta: pixel perfect outline shaders - https://www.videopoetics.com/tutorial...
• Tyson: smooth normal trick - https://stackoverflow.com/questions/5...
• Rolemusic: music "The Great Madeja" - https://freemusicarchive.org/music/Ro...
• polyperfect: Low Poly Ultimate Pack - https://assetstore.unity.com/packages...

#GameDev #IndieDev #Unity