Grass usign Shader graph on terrain is floating

Hi there, does anyone know the function or can post the picture of the graph nodes, how to implement grass that is not floating on terrain but sticks to it on different terrain angles, also pointing upwards? thanks :smile:

the detail mesh placement is not a solution itā€™s not working- not letting me use any texture format (RGB32 etc)

Since youā€™re in 6, are you setting the ā€œalign to groundā€ in your details?

If you have that but want to also spin the detail to face different ways, your shader should just rotate your verts in object space around the Y axis by some random amount. Use the object world position to seed a random value for that rotation so.

yeah, thanks for thatā€¦ but as I stated :
the detail mesh placement is not a solution- itā€™s not working- not letting me use any texture format (RGB32 etc)ā€¦
Can you check what texture format you are using when u want a mesh to be in detail prefab? Can you paint with it? for me its not possible- just says error invalid format texture.

When you say itā€™s not letting you use any texture format, Iā€™m not sure where that comes in. You are using the ā€œdetail meshā€ method, right? Not the ā€œGrass textureā€ version? The latter is pretty old school and not nearly as flexible or performant as a proper mesh. If you do use the old method, donā€™t mix it with mesh details.

There are two requirement for a detail mesh:

  1. Itā€™s a single GameObject with just a MeshRenderer on it (no collision, no hierarchy, etc). Ideally has a base scale of 1,1,1.
  2. The material on the detail mesh has to support instancing. Generally any old shadergraph will work as long as instancing is turned on. Iā€™ve never run into texture specific issues there, is it not working with one particular texture, or is it just not working? Iā€™d generally avoid using an uncompressed textures for a detail mesh on performance grounds, itā€™s gonna be several times more memory bandwidth than the equivalent DXT5, but Iā€™ve never seen it actually complain (though maybe itā€™s because I avoid going down that route).

If you want some working examples, the Terrain Samples in the asset store work, that should give you a sense of how a detail mesh should be set up.

Use an LTS version of unity. Unity 6 is in preview so youā€™re going to run into bugs.