Look at the attached picture! A tree casts a shadow into a body of water. The water is a plane with a HDRP Lit shader with a Transparent surface.
I took a quick peek at the generated code but could not find anything to help me right now. A thread on Stack Overflow suggested using the keyword _RECEIVE_SHADOWS_OFF, but this seems to be removed from the generated code.
Any suggestion on alternative approach appreciated
How do you make water? Do you have shadows appearing on the water surface?
On a plane in inspector there is a checkbox for “recieve shadow” as i remember
Also you can tweek shadow dim in your Light source
This option is not present in an HDRP Lit Shader.
A workaround is to make the shader unlit and calculate the light manually. You can do this by transforming the normal information to world vectors, then taking the dot product for the normal vectors and the sun direction. It will work for multiple light sources, as long as they are directional. You just add more input vectors to the shader and evaluate the lighting for each one of them, eg. if you have a sun and a moon.
Of course, this workaround will not work with points lights and much of other lighting effects.
In the material, if you use “premultiply” in blending mode, you can then lower the value of the color to zero to dim the shadow and then you can use whatever alpha value. In fact i think that is the way it should be.