Search Unity

Question Only include keyword when shadow cascades is enabled (Shader Graph OR HLSL)

Discussion in 'Shader Graph' started by DevDunk, Mar 23, 2023.

  1. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    I have a bug with a shader breaking when shadow cascades is disabled, while I still multi_compile the shadow cascade keyword in the HLSL (or shader graph). Is there a way to only do this when shadow cascades is enabled?
    I cannot find a preprocessor for this, so maybe someone knows here


    #pragma multi_compile _MAIN_LIGHT_SHADOWS_CASCADE