Shadows on water shader

I have a water shader that works fine, but the only thing i´m missing is the shadows, it doesn’t look too bad without them but it would look beter if there were shadows. Is it possible to render them on a water shader with Unity?

If it’s a surface shader adding “addshadow” to the end of your pragma will work.

Like this:

#pragma surface surf BlinnPhong vertex:vert addshadow

I’m using a fragment shader, so that doesn’t work.

Maybe try here: How do I sample a shadowmap in a custom shader? - Questions & Answers - Unity Discussions