filmov
tv
Creating a Foliage Shader in Unity URP! Grass, Trees, Flowers, Hedges and More | Game Dev Tutorial
Показать описание
✔️ Tutorial tested in Unity URP 2020.3 & 2021.3
Plants, foliage and vegetation are really challenging to get right! It requires a custom made shader to tackle issues like translucency and wind. In this tutorial, I show how to create a foliage shader in the Unity URP (Universal Render Pipeline) Shader Graph. It supports all light types, shadows, and baked lighting, and includes several strategies for translucency, like separate normals for diffuse lighting and subsurface scattering. I also implement programmable wind animation and show a simple method to reconstruct normals. For grass billboards and tree leaf cards, I also demonstrate how to create double sided materials with normal map support.
📚 If you prefer reading, check out the written version of this tutorial here:
✏️ Text-only shader version coming soon!
🌟Previous videos:
🌞 Interactive lighting math explorer:
👋 Subscribe for weekly game development videos!
👑 Join my Patreon to watch videos early, download all project files, vote on future topics, and more! Thank you so much!
🔗 Visit my website for a searchable list of tutorials!
💻 Script reference:
⏲️ Timestamps:
0:00 Intro
0:26 Core ad
1:58 Tutorial info
3:35 Project set up
6:41 Two sided rendering
9:27 Shape normals
15:54 Translucent lighting
21:12 Data maps
25:23 Wind
34:14 Normal reconstruction
40:25 Examples
41:23 Wrap up and credits
🎖️ Credits, references and further reading:
Neon Laser Horizon by Kevin MacLeod
#GameDev #IndieDev #Unity
Комментарии