✔️ Tutorial tested in 2020.3 and 2021.3
Have you ever wondered how lighting and shadows work in Unity? Or, do you want to write your own shaders for the Universal Render Pipeline, but without Shader Graph? Either because you need some special feature or just prefer writing code, this tutorial has you covered.
In fact, this is the third part in a series about writing HLSL shaders for URP. In this video, I aim to demystify transparency! I'll showcase how to work with blended and cut out transparency. Along the way, we'll learn about custom inspectors, render queues, culling, shader features, and double sided lighting.
Tutorial series:
📰 Article version ► https://nedmakesgames.medium.com/f6ccd6686507
🔀 Playlist ► https://www.youtube.com/playlist?list=PLAUha41PUKAYdsStTcjJbNV-GM3F2xm9s
1️⃣ The Graphics Pipeline ► https://youtu.be/KVWsAL37NGw
2️⃣ Lighting and Shadows ► https://youtu.be/1bm0McKAh9E
3️⃣ Transparency ► You're watching it!
4️⃣ PBR Materials ► Coming soon
5️⃣ Advanced Lighting ► Coming soon
6️⃣ Advanced URP Features ► Coming soon
7️⃣ Custom Lighting Models ► Coming soon
8️⃣ Vertex Animation ► Coming soon
9️⃣ Interacting with C# ► Coming soon
👑 Join my Patreon to access tutorials early, download project files, vote on future topics, and more! Thank you so much!
► https://patreon.com/nedmakesgames
🔗 Check out my website for a searchable list of tutorials!
► https://nedmakesgames.github.io
2️⃣ 2nd Channel ► https://www.youtube.com/nedmakesgames2
🔴 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
📚 Reference scripts
► Getting started: https://gist.github.com/NedMakesGames/0fc3cc299443d7efe81f25486c7178ec
► Complete: https://gist.github.com/NedMakesGames/4c9bc4ae54c8c481f299538ce420b29a
⏲️ Timestamps:
0:00 Intro
1:10 Alpha blending
2:37 ZWrite modes
3:18 Render queues & draw order
5:57 Partial shadows
6:22 Custom inspectors
12:24 Alpha cutouts
14:26 clip & discard
15:33 Customizable cutoffs
16:30 Keywords & shader features
20:02 Common hlsl files
22:40 Clipping shadows
24:16 Culling
25:50 Double sided lighting
28:50 Face rendering modes
31:05 Wrap up and credits
🎖️ Credits, references and further reading:
• Unity Technologies: Shader Calibration Scene - https://assetstore.unity.com/packages/templates/tutorials/shader-calibration-scene-25422
• tonyflanagan: Thailand Girl — Animated - https://sketchfab.com/3d-models/thailand-girl-animated-a41f779fe45b4a04bdbf212e49b7f6b5
• Aleksei Vlasov ⚡ CRWDE: Phonograph - https://sketchfab.com/3d-models/phonograph-1503329e69034a0fbb360504a1c4fba9
• gugusheep: VR Showroom Gallery for product placement - https://sketchfab.com/3d-models/vr-showroom-gallery-for-product-placement-d8f967fb44ea46cb9b62e720c6485ac0
• Helindu: The ultimate glass pack (cups and bottles) - https://sketchfab.com/3d-models/the-ultimate-glass-pack-cups-and-bottles-1ea37815fb0145e49487386d6924b341
• Leandro Nicolas: Snow Globe - https://sketchfab.com/3d-models/snow-globe-58a0f7e834c14413bb1a7e4262051180
• Andriy Shekh: Pine tree - https://sketchfab.com/3d-models/pine-tree-e52769d653cd4e52a4acff3041961e65
• Sergej Majboroda: Studio Small 09 - https://polyhaven.com/a/studio_small_09
Music provided by Epidemic Sound
#GameDev #IndieDev #Unity