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

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

72.131 Lượt nghe
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