Make every shader have a dither crossfade effect (HDRP).

So I want EVERY shader in my game to have a dither crossfade effect. And I don’t want to rewrite HDRP/Lit (with a billion permutations) for it. Is there an option for me?

The overall goal is to be able to slowly fade away walls that block the camera, while walls can consist of every material used in the game (mostly HDRP/Lit though).

You can “hack” this by using LODs and the crossfade toggle on it. Going from visible wall to nothing, it should make the wall disappear.
BUT if will fade the whole object in once, not “slicing” the wall depending on the camera distance.

@Remy_Unity omg this actually works! And I can control the process using “size” variable! Jesus… I’m speechless… 2.5 years on HDRP I was looking for a solution and it’s THIS simple… The only reason I did not know about it is because my game is top-down and I never worked with LOD games…

I can’t even begin to thank you! I almost lost hope… Jesus I’m so happy right now! Thank you again!

Ok, this does not work for custom HDRP shaders written with shader graph. Could you tell me how to write custom shaders so that they support LOD crossfade?

Daem, I knew it was too easy)…

Ok, I guess it’s not important - I will dig through the Lit shader and find the keyword and variable responsible for crossfading and will write crossfading logic into my shaders.

@cubrman Tried this option ?
8568743--1146983--upload_2022-11-7_16-41-48.png

@Remy_Unity dude, u r a savior, I can’t thank you enough. I was about to redo all my custom shaders to inject dither crossfade into them and u were right on time with this comment. THNAKS A LOT!