I’m working on a project which involves writing custom foliage shaders. Currently, I’m working on just grass as everything I want to implement would be present there and other shaders can be more simplified versions of this one, but I’m hitting a road block that seems to have hit everyone else, except for this guy:
but he doesn’t explain how its done.
So right now, I’m trying to do an alpha cutout surface shader that takes shadows from the world (realtime would be wonderful but I’d settle for baked), and uses the standard shader model. I’m also doing animation in the vertex shader to simulate wind. This is just the way I’ve figured out to do it, so if there is an easier way to get the same effect I would LOVE to know. (I do want there to be a lot of grass in my world so I figured doing as much on the gpu as possible would be a good idea)
Anyways short of having an alternative way, or
TLDR; I’d like to find a way of doing an alpha masked shader that has shadows on it. Everything else (vertex animation, the actual alpha masking, standard shader etc.) all works. Its literally just the shadows now.
Have any of you implemented custom grass before? How did you do it? (I know there are things on the asset store, but part of this project is to learn how to do this stuff by hand.)
Thanks!
Peter