2

Unlike default URP shaders, custom Shader Graph shaders dont come with a "receive shadows" checkbox as you can see here. How can I disable shadow receiving on my shader? Or alternatively, turn off shadow receiving on any material/object that uses my shader

this is a lit shader that does have "receive shadows" option

Ezequiel
  • 23
  • 1
  • 1
  • 4
  • Not really a solution but you can inspect the shader and just copy over the receive shadow logic to your new shader – Menyus Aug 26 '20 at 11:46

3 Answers3

9
  1. Go to your Graph.
  2. Below Properties, there is a section called Keywords.
  3. Add a new Keyword, set Reference to _RECEIVE_SHADOWS_OFF, Definition Shader Feature, Scope Global and Default True.
  4. Go to your material, click on three dots in the right upper corner of the Inspector and select Debug
  5. Set Shader Keywords to _RECEIVE_SHADOWS_OFF

That should do it.

Yern
  • 333
  • 1
  • 10
1

You can turn off the Receive Shadows within the Graph Settings tab of Graph Inspector panel in your shader graph.

enter image description here

0

When you enable the Debug mode of Inspector, you can see the checkbox of Receive Shadows just right bellow the Renderer.

EDIT:Unfortunately it's not working. and maybe a deprecated interface.

But the keyword method could be more handy if you'd like to expose it. You can check the checkbox of the keyword and it turns on and off quickly. enter image description here

Book Sun
  • 111
  • 1
  • 4