Mask shadowed areas

Hello,

I have a material effect on a landscape that I’d like to hide on shadowed areas.
Getting directional light’s forward vector doesn’t help since it doesn’t care if there is anything between the landscape and directional light.

Any ideas?
Thanks in advance.

Unfortunately, you can’t do that and will have to move the effect somewhere, like deferred light shader, where you can actually get the shadowmap.