How to fix Shadows being visible through grass

Hello everyone i would rally appreciate if anyone could tell me how to fix this issue im having in Unity 5.Im working on my project and i placed some LOD trees.They cast shadows on the terrain.However when i add details and grass and play the game my character is at ground level and im able to see the trees shadows through the grass which should be obstructing my view of them.

@penna91 @JCalwaysbeatsErick

Hey! I found a way to solve the problem. I had the same problem, where it would look like this:60718-objectsvisibletroughgrass.png

THE SOLUTION, or what makes it look normal at least is to add a cookie texture to your directional light. I just went into the directional light and selected a texture in the “cookie” thing. Now, what cookie does is to (kinda) act like the light was going trough your texture of choice which creates shadows in the shape of your texture. However, if you select a texture without alpha you don’t get that effect, the scene is unaffected BUT the weird grass problem is magically fixed. I don’t know why, but this just seems to work. I just took a random texture I found in my scene without alpha that was also used for barrels in my game and used as cookie.

With a cookie texture it looks like this: 60719-problemsolved.png

I hope this will fix the problem for you too!

Wow i would have never guessed the solution wouldve been in a directional light texture.i thought it lied in the grass itself or maybe in the shadows options in the properties panel.thanks for the help

The ACTUAL fix is to open the terrain’s options (cog button) and increase the Detail Resolution Per Patch value from the default 8 to, say, 16. If your grass density is higher, you might need more, but it definitely fixes the problem.