![]() This has turned out to be a very efficient way of rendering grass. I am using a point cloud technique to get the positions of each blade of grass. So I am currently working on a Grass Shader, rendering each blade of grass. Density map works on a grayscale, so if the color hit is Gray to Black, it will draw grass. So make sure to use the Density map feature. However, this is the type asset that will (should) be sprinkled throughout your scene. Occlusion culling works out of the box, just set the "*_SGRenderer" object to "Occludee Static" and include all children. I'm not a shader wizard so if anyone wants to help tackle that part, be my guest. ![]() NOTE 4: I'm in the process of figuring out the LOD/Distance culling for this shader. NOTE 3: The tutorial video is choppy when I pressed play, that's due to the recorder, you can see in the stats screen that I get good framerates. This uses raycast, so whatever your collider(s) looks like along the Y axis will be the footprint of the grass. ![]() NOTE 2: This does work on meshes, just make sure your Target GameObject has a collider. NOTE 1: If you use a density map, make sure to make it read/writable in the import settings. If anyone has questions, please feel free to ask. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |