Shader That Receives Shadows Without Casting

I’m new to shaders and I was wondering if it’s possible to create a shader that does not cast shadows while still being affected by other shadow casting objects. I haven’t been able to figure out anything but both or neither.

Is it technically possible? Yes.
It’s it advisable to do it via a shader? No.

Change the shadow casting settings on the renderer component.

The shadow caster pass is used by Unity for both shadow casting (as the name implies) and shadow receiving, at least for the main directional light on non-mobile platforms. On desktop & consoles Unity receives the main directional shadows onto the camera depth texture, the results of which are saved as a screen space texture shadow receiving objects sample later. The problem is a single shader variant is used for casting directional shadows, spot light shadows, and rendering the camera depth texture. And there’s no 100% guaranteed way to detect which one it is from the shader.

Okay, I see the problem with that method.
I had no idea you could change shadow casting settings for sprite renderer components, as for some reason this setting is not visible in the inspector, even though it is for mesh renderers. But, setting it via a script did exactly what I wanted to. Thanks!