Transparent and Crystal Clear | Writing Unity URP Code Shaders Tutorial [3/9] ✔️ 2021.3

Опубликовано: 29 Сентябрь 2024
на канале: Ned Makes Games
7,923
245

✔️ 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 ►   / f6ccd6686507  
🔀 Playlist ►    • Writing URP Code Shaders Series  
1️⃣ The Graphics Pipeline ►    • The Graphics Pipeline and You | Writi...  
2️⃣ Lighting and Shadows ►    • Let There Be Light (And Shadow) | Wri...  
3️⃣ Transparency ► You're watching it!
4️⃣ PBR Materials ►    • Mapping Our Way to PBR | Writing Unit...  
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!
►   / nedmakesgames  

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

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

📚 Reference scripts
► Getting started: https://gist.github.com/NedMakesGames...
► Complete: https://gist.github.com/NedMakesGames...

⏲️ 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...
• tonyflanagan: Thailand Girl — Animated - https://sketchfab.com/3d-models/thail...
• Aleksei Vlasov ⚡ CRWDE: Phonograph - https://sketchfab.com/3d-models/phono...
• gugusheep: VR Showroom Gallery for product placement - https://sketchfab.com/3d-models/vr-sh...
• Helindu: The ultimate glass pack (cups and bottles) - https://sketchfab.com/3d-models/the-u...
• Leandro Nicolas: Snow Globe - https://sketchfab.com/3d-models/snow-...
• Andriy Shekh: Pine tree - https://sketchfab.com/3d-models/pine-...
• Sergej Majboroda: Studio Small 09 - https://polyhaven.com/a/studio_small_09

Music provided by Epidemic Sound

#GameDev #IndieDev #Unity