Mapping Our Way to PBR | Writing Unity URP Code Shaders Tutorial [4/9] ✔️ 2021.3

Опубликовано: 01 Апрель 2026
на канале: Ned Makes Games
7,637
221

✔️ 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.

This is the fourth part in a series about writing HLSL shaders for URP. In this video, we take a look at PBR, or physically based rendering, and implement a variety of effects aiming to simulate different materials. By the end, we will support metals, glasses, glowing objects, plastics, and more!

Tutorial series:
📰 Article version ►   / 6c4ae9875529  
🔀 Playlist ►    • Writing URP Code Shaders Series  
1️⃣ The Graphics Pipeline ►    • The Graphics Pipeline and You | Writing Un...  
2️⃣ Lighting and Shadows ►    • Let There Be Light (And Shadow) | Writing ...  
3️⃣ Transparency ►    • Transparent and Crystal Clear | Writing Un...  
4️⃣ PBR Materials ► You're watching it!
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:12 Physically based rendering
2:55 Debug views
3:28 Normal maps
7:07 Tangent space
10:34 Implementing normal mapping
16:20 Metalness
18:32 Specular workflow
20:27 Smoothness masks
22:11 Blend modes
25:41 Emission
27:12 Parallax occlusion
30:25 Clear coat
31:44 Toggling features
33:40 Channel packing
35:01 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...
• 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-...
• Shedmon: Wooden Slingshot - https://sketchfab.com/3d-models/woode...
• Lennart Demes: Ground 054 - https://ambientcg.com/view?id=Ground054
• Juani Forn: Korean Ornamental Dragon - https://sketchfab.com/3d-models/korea...
• wallon: Audi R8 - https://sketchfab.com/3d-models/audi-...
• Francesco Coldesina: Violin Burito - https://sketchfab.com/3d-models/violi...
• Joey de Vries: Learn OpenGL, Parallax Mapping - https://learnopengl.com/Advanced-Ligh...
• Catlike Coding: Texturing a Sphere - https://catlikecoding.com/unity/tutor...
• Austin Newman: Transition Woosh - https://austinmakesfilms.sellfy.store...

Music provided by Epidemic Sound

#GameDev #IndieDev #Unity