URP 12 AR Shadows

After upgrading to Unity 2021 the existing AR Shadows (a fully trasparent material that only renders shadows cast on it) shaders stopped working, is there a newer solution?

up

I know that main light shadow keywords have changed in URP 12 (see this thread ).

Are you using a single “_MAIN_LIGHT_SHADOWS” keyword in the shader?

If yes, you can try replacing:
#if defined(_MAIN_LIGHT_SHADOWS)

With this:
#if defined(MAIN_LIGHT_CALCULATE_SHADOWS)

“MAIN_LIGHT_CALCULATE_SHADOWS” will be defined somewhere (*.hlsl) when the shadow is enabled.

And change the pragma:
#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN

3 Likes

no effect(

I don’t know anything about shaders, I just use the shader provided in the forums…