Hi, I’m currently looking to add a functionality to a shader, if possible, that adds color varation to my existing grass meshes.
Disclaimer: I am not using the terrain engine stuff from Unity.
My shader does animated vertex displacement and optional texture blending on uvchannel 1 (for snow or dirt on the grass).
My grass patch consists of ~5000 subobjects that come from a scatter object in 3ds max. They look satisfying, however they all have the same grass texture and tint:
Which looks too cheap.
I would like to have either a pattern type function, that uses a color range and somehow creates random “spots” that are a little darker or brighter, or use a noise type texture that somehow is treated as a planar overlay over the entire object and multiplies it’s pixels over the normal grass texture, so it looks something like this:
This was made on a terrain with 3 different grass “healthy” colors.
I really would like to have this done already inside the shader, the only other option I can think of is make a uvchannel2 that has a planar mapping that projects the noise texture downwards and covers the entire grass object, but that would distort around the grass polys.
I’d appreciate any tips or links to docs that could help me learn about such a shader topic, if it exists.
I am really disappointed in the Unity shader documentation, it does not seem to really be a documentation, but rather a list of basic examples.
Thanks







