- Home /
Make Terrain Grass Opaque
Is there a way to make Unity's terrain grass opaque?
I'm using the grass to create foliage that is much bigger than the player, and this leads to being able to see through it. I would rather not have to go back and redo the entire terrain with detail meshes.
Answer by getyour411 · Dec 12, 2016 at 08:39 AM
You can use a custom material/shader for the Terrain if no built-in ones provide what you want; see the post here for some details from @tanoshimi blog
https://alastaira.wordpress.com/2013/12/07/custom-unity-terrain-material-shaders/
Custom material/shader looks to me like it is only used for rendering the actual Terrain itself (like the mesh) and not the foliage that is painted on top.
Sorry I cut/paste and had the wrong thing in my clipboard from prior post.
Try this link which talks about billboard shader; I assume (don't know) it would be similar workflow for non-billboard
http://answers.unity3d.com/questions/1150302/how-can-i-overwrite-the-built-in-grass-shader.html