8
Nov 06 '19
This is a guess, but it's probably GPU instancing. Multiple instances of the grass are created within the GPU.
6
u/capedChameleon13 Nov 06 '19
A good approach is to use a combination of tesselation and compute shaders. Tesselation shader uses a single point to generate the vertices of a blade of grass. Compute shaders are for culling, lod, applying forces like wind and gravity.
Check this project, https://github.com/AmanSachan1/Vulkan-Grass-Rendering/blob/master/README.md
Don't remember if I implemented lod culling or not.
9
u/InterimFatGuy Nov 06 '19
Making the LoD distance semi-random is genius.
3
u/Alawliet Nov 09 '19
Could you elaborate on this? What makes this genius? What effect does it produce that it is better than just using a constant lod?
6
u/Lv_InSaNe_vL Mar 17 '20
Sorry to post so long after your comment but it helps hide the divisions in LOD. Since humans are great at seeing straight lines its alot easier to tell when the LOD changes if its at a fixed point.
2
3
u/Cem_DK Nov 07 '19
Since no one has mentioned it: roystan has a nice grass shader tutorial. I think if you tweak the settings right, you can come very close to botw's grass. If you use this shader imho skip the part where the grass casts shadows.
4
Nov 06 '19 edited Nov 06 '19
1
2
u/furiant Nov 07 '19
The thing to keep in mind regarding BotW's grass is you can cut it short, so it's not some simple "fill area with x entity"
I'm not a coder, so I can't give any proper insight, but my guess is something amazing and simple at the same time.
-8
46
u/[deleted] Nov 06 '19
I can't help you with that, but I can link you to one really short pdf file about how grass was generated and rendered in GRID: Autosport
http://blog.codemasters.com/wp-content/uploads/2014/10/Rendering-Fields-of-Grass-using-DirectX11-in-GRID-Autosport.pdf