Stylized Grass in Unity URP! Compute Shaders, Layered Mesh, and Clip! ✔️ 2020.3 | Game Dev Tutorial @NedMakesGames
Stylized Grass in Unity URP! Compute Shaders, Layered Mesh, and Clip! ✔️ 2020.3 | Game Dev Tutorial  @NedMakesGames
Uploaded March 2021 | Updated September 2026, 3 weeks ago
✔️ Works in 2020.2 ➕ 2020.3

Grass is one of those things that almost every game needs, but is really hard to make! I hope to help with that with this series on grass. This grass renderer uses a compute shader to generate a bunch of layers over a mesh, only once in the editor. At runtime, it cuts out patterns from those layers using two overlapping noise textures. It's a classic technique that still produces good looking results!

👋 Subscribe for weekly game development videos!
► youtube.com/c/nedmakesgames?sub_confirmation=1

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

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

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

✨ Follow up videos
► Blade grass: youtu.be/6SFTcDNqwaA
► Shadow casting blade grass: youtu.be/IPoHY_yJxMc

🎬 Previous videos
► Generating meshes with a compute shader: youtu.be/AiWCPiGr10o
► Introduction to level of detail: youtu.be/-mE4qreuqJY
► Introduction to vertex/fragment/geometry shaders: youtu.be/7C-mA08mp8o
► Non-baked layer grass: youtu.be/c1JThTu6-Ok
► Shader graph grass: youtu.be/JDpt9xYaUYc

💬 Video transcript
► docs.google.com/document/d/1zErxPni6ioJ9KrWJJo6CyWgu3dYfNtb_n2J-IFKRY4o/edit?usp=sharing

📜 Required scripts
► Pyramid baker scripts: gist.github.com/NedMakesGames/fef1bddca8061b21845dbe68d0cddfec
► NMGLayerGrassHelpers.hlsl: gist.github.com/NedMakesGames/1c912db8532dedc53561d5047c4690a3

📚 Reference scripts
► Compute shader and C# scripts: gist.github.com/NedMakesGames/9bb59a7f2cb7cab988e7c0edc227ee90
► Initial graphics shaders: gist.github.com/NedMakesGames/a772e3fd98baf93bc9af739186233ccf
► Cut out graphics shaders: gist.github.com/NedMakesGames/5e7bba2d6ab7943c2a7923b4101f82e8
► Wind graphics shaders: gist.github.com/NedMakesGames/2b36967e3a5f8ba762bcbfc723135ba6
► Final graphics shaders: gist.github.com/NedMakesGames/81041119883b6eb5163ade76a184084b

⏲️ Timestamps:
0:00 Intro
0:48 Project setup
2:02 The compute shader
6:25 The C# scripts
8:33 The graphics shader
11:21 Cutting out shapes
13:16 Wind
14:35 Position as UV
16:05 Wrap up and credits

🎖️ Credits and references:
• Jason L. McKesson: Normal Transformation - paroj.github.io/gltut/Illumination/Tut09%20Normal%20Transformation.html
• Unity Technologies: GPU Instancing - docs.unity3d.com/Manual/GPUInstancing.html
• freepik: Wrinkled paper texture - freepik.com/premium-vector/wrinkled-paper-texture_711440.htm
• James "Nihilore" Opie: music "Whispers Invoke Paranoia" - youtube.com/watch?v=oc2PnJF58Sg

#GameDev #IndieDev #Unity
Stylized Grass in Unity URP! Compute Shaders, Layered Mesh, and Clip! ✔️ 2020.3 | Game Dev TutorialReworking Clients! Tactical Lizard Tamer, Unity Game Dev Log [Part 181]Pings and Input! Cannoneer, Unity Game Dev Log [Part 3]Basics of Mipmaps in Unity Part 1! Import Settings and Custom Mipmaps! ✔️ 2021.1 | Game Dev TutorialRefreshing Animations! Tactical Lizard Tamer, Unity Game Dev Log [Part 161]Drawing Boxes and Rectangles in URP Shader Graph with 2D SDFs! ✔️ 2021.1 | Unity Game Dev TutorialEmulating Chat! Twitch Concentration, Unity Game Dev Log [Part 4]Chat Enters the Game! Twitch Concentration, Unity Entities Game Dev Log [Part 12]Time and Animation in Shaders! URP Shader Graph and HLSL! ✔️ 2021.1 | Unity Game Dev TutorialTextures on the Map! Tactical Lizard Tamer, Unity Game Dev Log [Part 145]Audio Mixers Connected! Tactical Lizard Tamer, Unity Game Dev Log [Part 119]New Unity Version! Cannoneer, Unity Game Dev Log [Part 7]
Ned Makes Games |

Stylized Grass in Unity URP! Compute Shaders, Layered Mesh, and Clip! ✔️ 2020.3 | Game Dev Tutorial

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER