Vegetation Splat Shader

Is there anyway I can write a shader (my shader knowledge is minimal) that has no visible textures (so is transparent), but has a splat map that defines where meshes are placed? So if I drew Red on the splatmap, grass meshes would appear there and so on?

Any help would be great :smile:.

Nothing you could do in a shader, you’d have to use a script for that.

Then I have no idea what I’m doing. xD

Are you trying to add vegetation to a mesh object? If so, Aras posted a “grass generator” package a loooong time ago (pre- Unity terrain system) that did exactly what you’re asking for. It used the color channel of a texture as a splat map and distributed billboard vegetation based on that splat map. This had to be way back in the 1.x / 2.x days. Unity’s shader language has changed since then so I doubt if the shader code would work but the scripts might be worth a look-see. I also looked through my old assets and found a “grass on mesh” package dating back to 2009, not sure if it’s the same thing but drop me a PM if you want me to send it to you.

Send it to me if you can, I’d love to see it.