Cyanilux / URP_ShaderGraphCustomLighting

Some custom lighting functions/sub-graphs for Shader Graph, Universal Render Pipeline
MIT License
558 stars 63 forks source link

URP 14 shadow atten only return white #18

Closed SpikeborOfficial closed 11 months ago

SpikeborOfficial commented 11 months ago

I'm using Unity 2022.3.13f1, URP 14, I don't know what's up but shadow atten is just white...

Cyanilux commented 11 months ago

Shader Graph doesn't seem to collect keywords from nested subgraphs, so if you're using the Main Light Shadows node in a subgraph that might be why. You can manually add the keywords to the Blackboard :

For shadows to work in the Unlit Graph, the following keywords must be defined in the blackboard :

  • Enum Keyword, Global Multi-Compile "_MAIN_LIGHT", with entries :
    • "SHADOWS"
    • "SHADOWS_CASCADE"
    • "SHADOWS_SCREEN"
  • Boolean Keyword, Global Multi-Compile "_SHADOWS_SOFT"
SpikeborOfficial commented 11 months ago

thank you, sorry for your time, this is a wrong call. I don't know why my graph has receive shadow set to off. it's ok now.