Up next

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

0 Views· 03/09/24
wisdom
wisdom
3 Subscribers
3

✔️ 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!
https://www.youtube.com/c/nedm....akesgames?sub_confir

👑 Join my Patreon for extra influence over topics, early access to videos, and downloadable project files!
https://patreon.com/nedmakesgames

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

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

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

💬 Video transcript
https://docs.google.com/docume....nt/d/1YrGlu2uVrZbAXs

📜 Required scripts
► DepthNormalsFeature.cs: https://gist.github.com/NedMak....esGames/660ea67339e5
► OutlinesInclude.hlsl: https://gist.github.com/NedMak....esGames/9d433cce7575
► DecodeDepthNormals.hlsl: https://gist.github.com/NedMak....esGames/043a4f0c2e89
► BlitMaterialFeature.cs: https://github.com/NedMakesGam....es/RendererFeatureBl

⏲️ 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 - https://sketchfab.com/3d-model....s/toon-mushrooms-d55
• Cyanilux: Depth - https://www.cyanilux.com/tutor....ials/depth/#buffer-v
• Roystan: Outline Shader - https://roystan.net/articles/outline-shader.html
• Alexander Ameye: Outline Shader - https://alexanderameye.github.....io/outlineshader.htm
• 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 - https://github.com/microsoft/D....irectX-Graphics-Samp
• Ben Golus and Keijiro Takahashi: View direction from screen position - https://forum.unity.com/thread....s/help-with-view-spa
• James Opie AKA Nihilore: music "The Author Never Dies" - https://www.youtube.com/watch?v=Pm2QnPztgzY
• freepik: Wrinkled paper texture - https://www.freepik.com/premiu....m-vector/wrinkled-pa

#GameDev #IndieDev #Unity

Show more

 0 Comments sort   Sort By


Facebook Comments

Up next