Phantom shadows in custom URP shader

I have a somewhat extensive custom(not shadergraph) shader that I use with DOTS. At some point I introduced some error where I get these phantom shadows repeated, it almost looks like a shadow cube map. Just wondering if anyone had some quick observations / suggestions as posting all the passes, custom lighting functions etc is probably asking a bit too much as its spread amongst multiple files.

maturebountifuliriomotecat

Anyway my trouble shooting has been:
There’s a single directional light in scene
Its not the primary directional shadow(I toggle the ground plane temporarily in the gif to rule this out)
It still occurs with the shader’s entire shadow pass disabled
Stock “Lit” and other URP shadows also get rendered in there so its not just shadows from the custom shader
It disappears at certain distances(maybe something to do with the shadow cascade?)

Ive narrowed it to InputData.shadowCoord and modifying that output with GetMainLight is the only way I can temporarily disable the phantom shadows, though that results in zero shadows. Why this is happening is beyond my understanding.

fixed it, replaced one line

#pragma multi_compile _ _MAIN_LIGHT_SHADOWS _MAIN_LIGHT_SHADOWS_CASCADE _MAIN_LIGHT_SHADOWS_SCREEN

with

            #pragma multi_compile _ _MAIN_LIGHT_SHADOWS
            #pragma multi_compile _ _MAIN_LIGHT_SHADOWS_CASCADE

I think this might’ve been leftover from downgrading from urp12 to 10. This was actually been bugging me for a long time :slight_smile: