Have a problem about receiving shadows

I’m writing my own shader and I have learned about how to receive shadows. When I applied my shader to the grass, it did receive shadows. But the problem is, when I added some wind, the grass swung but the shadows didn’t. Since I’m using forward rendering with screen-space shadows, I guess that the problem appeared in generating shadow maps. So I tried to remove the fallback statement in my shader, and the shadow, as I expected, could be received but not cast on grass, directly on the ground instead (as shown blow).
So I guess my shader passes could not be taken into account when generating shadow maps. What should I add into my shader?
Thank you.

OK, fine. I added a shadow caster and it went right. I tried to add a shadow caster before, but forgot to enable instance. So shadow caster is neccesary even if you only receive shadows?