Uploaded August 2020 | Updated September 2026, 3 weeks ago
✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3 🩹 For 2020.2 and .3:
► 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
► In Lighting.hlsl, change the line "if SHADERGRAPH_PREVIEW" to "ifdef SHADERGRAPH_PREVIEW"
► Add a normalize node after view direction to fix a bug in certain Unity versions.
Toon shaders, also called cel shaders, create a cartoon-like style with segmented shading. In this video, I'll show you how to create these shaders in Unity using Shader Graph. Features include: diffuse and specular lighting, color textures, shading ramp textures, shadows, and multiple light sources. The custom lighting techniques can be used in a variety of shaders down the line!
👋 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
📚 Reference scripts
► Main light: raw.githubusercontent.com/NedMakesGames/ToonShaderTutorial/master/Assets/Shaders/Includes/Lighting%20Main%20Light%20No%20Shadows.hlsl
► Main light with shadows: raw.githubusercontent.com/NedMakesGames/ToonShaderTutorial/master/Assets/Shaders/Includes/Lighting%20Main%20Light%20Shadows.hlsl
► Main and additional lights: raw.githubusercontent.com/NedMakesGames/ToonShaderTutorial/master/Assets/Shaders/Includes/Lighting%20Smooth%20Blending.hlsl
► Final version for 2020.2 and onward: gist.github.com/NedMakesGames/073fa3799aacbc67bf4979243955d671
✨Follow up videos
► Spot light shadows: youtu.be/whmPkDp3dqo
⏲️ Timestamps:
0:00 Intro
1:00 Project setup
2:10 Simple (diffuse) lighting
5:39 Shading ramp textures
7:54 Color textures
8:57 Shadows
12:10 Specular lighting
14:59 Additional light sources
19:31 Wrap up and credits
🎖️ Credits and references:
• cgtrader.com/free-3d-models/animals/mammal/shiba-inu-dog-low-poly
• turbosquid.com/3d-models/3d-toroidal-knot-1258903
• turbosquid.com/3d-models/3d-model-cartoon-tree-1213267
• freesound.org/people/Akacie/sounds/73723
• blogs.unity3d.com/2019/07/31/custom-lighting-in-shader-graph-expanding-your-graphs-in-2019
• alexanderameye.github.io/simple-toon.html
• twitter.com/Cyanilux/status/1240636243060408321
• Music by leerosevere.bandcamp.com
#GameDev #IndieDev #Unity
✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3 🩹 For 2020.2 and .3:
► 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
► In Lighting.hlsl, change the line "if SHADERGRAPH_PREVIEW" to "ifdef SHADERGRAPH_PREVIEW"
► Add a normalize node after view direction to fix a bug in certain Unity versions.
Toon shaders, also called cel shaders, create a cartoon-like style with segmented shading. In this video, I'll show you how to create these shaders in Unity using Shader Graph. Features include: diffuse and specular lighting, color textures, shading ramp textures, shadows, and multiple light sources. The custom lighting techniques can be used in a variety of shaders down the line!
👋 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
📚 Reference scripts
► Main light: raw.githubusercontent.com/NedMakesGames/ToonShaderTutorial/master/Assets/Shaders/Includes/Lighting%20Main%20Light%20No%20Shadows.hlsl
► Main light with shadows: raw.githubusercontent.com/NedMakesGames/ToonShaderTutorial/master/Assets/Shaders/Includes/Lighting%20Main%20Light%20Shadows.hlsl
► Main and additional lights: raw.githubusercontent.com/NedMakesGames/ToonShaderTutorial/master/Assets/Shaders/Includes/Lighting%20Smooth%20Blending.hlsl
► Final version for 2020.2 and onward: gist.github.com/NedMakesGames/073fa3799aacbc67bf4979243955d671
✨Follow up videos
► Spot light shadows: youtu.be/whmPkDp3dqo
⏲️ Timestamps:
0:00 Intro
1:00 Project setup
2:10 Simple (diffuse) lighting
5:39 Shading ramp textures
7:54 Color textures
8:57 Shadows
12:10 Specular lighting
14:59 Additional light sources
19:31 Wrap up and credits
🎖️ Credits and references:
• cgtrader.com/free-3d-models/animals/mammal/shiba-inu-dog-low-poly
• turbosquid.com/3d-models/3d-toroidal-knot-1258903
• turbosquid.com/3d-models/3d-model-cartoon-tree-1213267
• freesound.org/people/Akacie/sounds/73723
• blogs.unity3d.com/2019/07/31/custom-lighting-in-shader-graph-expanding-your-graphs-in-2019
• alexanderameye.github.io/simple-toon.html
• twitter.com/Cyanilux/status/1240636243060408321
• Music by leerosevere.bandcamp.com
#GameDev #IndieDev #Unity
![Toon Outlines in Unity URP, Shader Graph Using Sobel Edge Detection! ✔️ 2020.3 | Game Dev Tutorial
✔️ 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!
https://www.youtube.com/c/nedmakesgames?sub_confirmation=1
👑 Join my Patreon for extra influence over topics, early access to videos, and downloadable project files!
► https://patreon.com/nedmakesgames
🔗 Check out my website for a searchable list of tutorials!
► https://nedmakesgames.github.io
🔴 Twitch ► https://www.twitch.tv/nedmakesgames
🐦 Twitter ► https://twitter.com/nedmakesgames
🎮 Discord ► https://discordapp.com/invite/ubxSVBK
📸 Instagram ► https://instagram.com/nedmakesgames
👽 Reddit ► https://reddit.com/u/nedmakesgames
🎶 TikTok ► https://www.tiktok.com/@nedmakesgames
☕ Ko-fi ► https://ko-fi.com/nedmakesgames
🎬 Previous videos
► Hull outlines: https://youtu.be/1QPA3s0S3Oo
► Introduction to renderer features: https://youtu.be/MLl4yzaYMBY and https://youtu.be/6Yg2EedqDhc
✨ Follow up videos
► Depth normals outlines: https://youtu.be/fW-5srSHDMc
► Single object outlines: https://youtu.be/74AS5DmLe8w
► Optimized outlines: https://youtu.be/8Xq7tU5QN1Q
📜 Required scripts
► BlitMaterialFeature.cs: https://github.com/NedMakesGames/RendererFeatureBlitMat/blob/master/Assets/Rendering/Desaturate/BlitMaterialFeature.cs
📚 Reference scripts
► Depth only: https://gist.github.com/NedMakesGames/ce127e6bcad7e827ff9f4c22f04dc48f
► Final: https://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 - https://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 - https://github.com/Unity-Technologies/UniversalRenderingExamples
• Alex Ameye: Outline Shader - https://alexanderameye.github.io/outlineshader.html
• polyperfect: Low Poly Ultimate Pack - https://assetstore.unity.com/packages/3d/props/low-poly-ultimate-pack-54733
• freepik: Wrinkled Paper Texture - https://www.freepik.com/premium-vector/wrinkled-paper-texture_711440.htm
• M_Studios: Flower Vase - https://www.turbosquid.com/3d-models/free-flower-vase-3d-model/1031039
• Visager: music In the Branches [Loop] - https://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 Tutorial](https://i.ytimg.com/vi/RMt6DcaMxcE/mqdefault.jpg)
![Movement Animations! Tactical Lizard Tamer, Unity Game Dev Log [Part 109]
Im making a game in Unity! It will be a mixture of Pokemon teambuilding on a Fire Emblem / Final Fantasy Tactics style-map. Players will be able to mod in their own monsters and battle online!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Blog ► https://nedmakesgames.tumblr.com
Discord ► https://discordapp.com/invite/ubxSVBK Movement Animations! Tactical Lizard Tamer, Unity Game Dev Log [Part 109]](https://i.ytimg.com/vi/RQxBW__YAfw/mqdefault.jpg)
![Entity-Based Terrain Mesh! Tactical Lizard Tamer, Unity Game Dev Log [Part 133]
Im making a game in Unity! It will be a mixture of Pokemon teambuilding on a Fire Emblem / Final Fantasy Tactics style-map. Players will be able to mod in their own monsters and battle online!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Blog ► https://nedmakesgames.tumblr.com
Discord ► https://discordapp.com/invite/ubxSVBK Entity-Based Terrain Mesh! Tactical Lizard Tamer, Unity Game Dev Log [Part 133]](https://i.ytimg.com/vi/S7A0Fh5hjWU/mqdefault.jpg)
![Game Over Transitions! Mazoid, Unity Game Dev Log [Part 2]
Im making a game in Unity! Please subscribe so you wont miss a video!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Blog ► https://nedmakesgames.tumblr.com
Discord ► https://discordapp.com/invite/ubxSVBK
Instagram ► https://instagram.com/nedmakesgames Game Over Transitions! Mazoid, Unity Game Dev Log [Part 2]](https://i.ytimg.com/vi/SV9N19CpLe0/mqdefault.jpg)
![Smooth Terrain Lighting! Tactical Lizard Tamer, Unity Game Dev Log [Part 129]
Im making a game in Unity! It will be a mixture of Pokemon teambuilding on a Fire Emblem / Final Fantasy Tactics style-map. Players will be able to mod in their own monsters and battle online!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Blog ► https://nedmakesgames.tumblr.com
Discord ► https://discordapp.com/invite/ubxSVBK Smooth Terrain Lighting! Tactical Lizard Tamer, Unity Game Dev Log [Part 129]](https://i.ytimg.com/vi/TGOj8JNoF1M/mqdefault.jpg)
![Tile-based Terrain Textures! Tactical Lizard Tamer, Unity Game Dev Log [Part 143]
Im making a game in Unity! It will be a mixture of Pokemon teambuilding on a Fire Emblem / Final Fantasy Tactics style-map. Players will be able to mod in their own monsters and battle online!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Blog ► https://nedmakesgames.tumblr.com
Discord ► https://discordapp.com/invite/ubxSVBK Tile-based Terrain Textures! Tactical Lizard Tamer, Unity Game Dev Log [Part 143]](https://i.ytimg.com/vi/TeuBYFLsIro/mqdefault.jpg)
![Our First IJob! Twitch Concentration, Unity Game Dev Log [Part 3]
Im making a game in Unity! Please subscribe so you wont miss a video!
This project is a Twitch-integrated pair-matching, Concentration like game. Viewers guess pairs in chat, and the pairs are viewer logos!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Discord ► https://discordapp.com/invite/ubxSVBK
Instagram ► https://instagram.com/nedmakesgames
Tutorial Tuesday Submission ► https://forms.gle/vdEWUj49dVA5aTud9
Project GitHub ► https://github.com/NedMakesGames?tab=repositories Our First IJob! Twitch Concentration, Unity Game Dev Log [Part 3]](https://i.ytimg.com/vi/TgFUc5qClE8/mqdefault.jpg)
![A Simple Title Screen! Tactical Lizard Tamer, Unity Game Dev Log [Part 173]
Im making a game in Unity! It will be a mixture of Pokemon teambuilding on a Fire Emblem / Final Fantasy Tactics style-map. Players will be able to mod in their own monsters and battle online!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Blog ► https://nedmakesgames.tumblr.com
Discord ► https://discordapp.com/invite/ubxSVBK A Simple Title Screen! Tactical Lizard Tamer, Unity Game Dev Log [Part 173]](https://i.ytimg.com/vi/U4h47Xvlvnk/mqdefault.jpg)
![Introducing Data-Oriented Programming! Twitch Concentration, Unity Game Dev Log [Part 2]
Im making a game in Unity! Please subscribe so you wont miss a video!
This project is a Twitch-integrated pair-matching, Concentration like game. Viewers guess pairs in chat, and the pairs are viewer logos!
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Discord ► https://discordapp.com/invite/ubxSVBK
Instagram ► https://instagram.com/nedmakesgames
Tutorial Tuesday Submission ► https://forms.gle/vdEWUj49dVA5aTud9
Project GitHub ► https://github.com/NedMakesGames?tab=repositories Introducing Data-Oriented Programming! Twitch Concentration, Unity Game Dev Log [Part 2]](https://i.ytimg.com/vi/UWz5q2C0qFE/mqdefault.jpg)
![Experimenting with a Sparkle Shader! Unity Game Dev Log [VFX Thursday]
Im making games in Unity! Please subscribe so you wont miss a video. I Stream every weekday!
Shader inspiration: https://twitter.com/bobacupcake/status/957777266959794176
Twitch ► https://www.twitch.tv/nedmakesgames
Twitter ► https://twitter.com/nedmakesgames
Discord ► https://discordapp.com/invite/ubxSVBK
Instagram ► https://instagram.com/nedmakesgames
Tutorial Request Submission ► https://forms.gle/vdEWUj49dVA5aTud9
Projects GitHub ► https://github.com/NedMakesGames?tab=repositories
Thumbnail background photo by Katie Harp on Unsplash. Experimenting with a Sparkle Shader! Unity Game Dev Log [VFX Thursday]](https://i.ytimg.com/vi/UeUSccjwAfw/mqdefault.jpg)
