How to make a terrain detail rotate according to terrain height?

Here’s an example of my problem:

I am trying to use detail to make my world look a little better then right now, but the grass detail texture is clipping into the hill in the terrain background. I am wondering how to rotate the detail in a way so it looks like its coming out of the hill instead of clipping in the hill. It would be very helpful if there is a fix to this issue. If you answered, thanks for answering!

looks like your detail is a sprite that “always faces camera”

That’s not what I mean, if you see the image I linked the grass of clipping into the hill, so I was wondering how to rotate it to a point so it doesn’t look like it’s clipping in.

pick the normal of the face it’s on
On grass spawn :
-Raycast down
-pick returned normal

  • align grass’ up with normal