"I just thought, 'It would be fun to have grass that expands to infinity.'"
Take a look at another example of beautiful grass from the Unity subreddit, created by Technical Artist Youssef Afella, who also shared the project code for free.
Similar to August Håkansson's grass system, this infinite GPU grass field that doesn't require storing trillions of positions in memory was inspired by Colin Leung's repository. Youssef Afella revealed that he made this project just for fun and had no idea how he could possibly use it in any way in a game. "I just thought, 'It would be fun to have grass that expands to infinity', that's all. But since a lot of people liked it let's push this shit to the production level", commented the developer.
If you want to incorporate this grass into your project, first you need to make sure that it has URP. According to Youssef Afella, the only folder you gonna need to add to your project is the "Core" folder. After importing it, just make a new empty object in your scene and add the script "InstancedIndirectGrassRenderer." You will need to assign some properties: the first one is the compute shader, which is GrassPositionsCompute, and the second is the material named InstancedIdirectGrass. Then, you should be able to see the grass in your scene. Play with the values in the script and the grass material to fit your scene.
Get the code here and learn more in the original Reddit post. Also, join our 80 Level Talent platform and our Telegram channel, follow us on Instagram, Twitter, LinkedIn, TikTok, and Reddit, where we share breakdowns, the latest news, awesome artworks, and more.