✔️ Works in 2020.1 ➕ 2020.2 ➕ 2020.3
🩹 Fixes:
► Make sure your source mesh has read/write enabled in it's asset importer inspector.
Grass is a tough thing to render for any game. I've shown two ways to do it, and here's a third approach! This uses a compute shader to extrude a blade of grass from each triangle on a source mesh. The blades dynamically simplify when far from the camera, helping you to create large fields, and wave with the wind too.
👋 Subscribe for weekly game development videos!
[ Ссылка ]
👑 Join my Patreon for extra influence over topics, early access to videos, and downloadable project files!
► [ Ссылка ]
🔗 Check out my website for a searchable list of tutorials!
► [ Ссылка ]
🔴 Twitch ► [ Ссылка ]
🐦 Twitter ► [ Ссылка ]
🎮 Discord ► [ Ссылка ]
📸 Instagram ► [ Ссылка ]
👽 Reddit ► [ Ссылка ]
🎶 TikTok ► [ Ссылка ]
☕ Ko-fi ► [ Ссылка ]
🎬 Previous videos
► Compute shader basics: [ Ссылка ]
► Cross-mesh grass in shader graph: [ Ссылка ]
► Geometry shader layered grass: [ Ссылка ]
► Compute shader layered grass: [ Ссылка ]
✨Follow up videos
► Trample effects on cross mesh grass: [ Ссылка ]
► Improved blade grass: [ Ссылка ]
📜 Required scripts
► NMGGrassBladeComputeHelpers.hlsl: [ Ссылка ]
► NMGGrassBladeGraphicsHelpers.hlsl: [ Ссылка ]
📚 Reference scripts
► Base: [ Ссылка ]
► Randomization: [ Ссылка ]
► Segments: [ Ссылка ]
► Wind: [ Ссылка ]
► Instantiation: [ Ссылка ]
► LOD: [ Ссылка ]
⏲️ Timestamps:
0:00 Intro
0:44 Project setup
1:30 Base scripts
10:34 Randomization
12:48 Segments
15:54 Wind
18:26 Instantiation
19:17 LOD
20:58 Wrap up and credits
🎖️ Credits and references:
• Roystan: Grass Shader - [ Ссылка ]
• CJT-Jackson: URP Geometry Shader Example - [ Ссылка ]
• Keijiro Takahashi: AngleAxis3x3 - [ Ссылка ]
• Ronja Böhringer: White Noise - [ Ссылка ]
• Siddharth Hegde: Messing with Tangent Space - [ Ссылка ]
• freepik: Wrinkled paper texture - [ Ссылка ]
• benblo: TransformBounds - [ Ссылка ]
• DuncanF - Lockless marching cubes with DrawProceduralIndirect - [ Ссылка ]
• Kevin Hartnell: music "The 13th Nocturne" - [ Ссылка ]
#GameDev #IndieDev #Unity
Ещё видео!