//Edit: This was my fault, cross fading was disabled in the HDRP asset that was in use. Was a bit confusing that this has no impact on the editor.
I’m currently using ShaderGraph and HDRP 8.1 in Unity 2020.1.0b14. I’ve set up a Lit shader and there is an option “Support LOD CrossFade” in ShaderGraph, and this works properly in editor for LODGroups with “animated cross fade” setting (at least for assets in the scene).
However, it neither works when loading the asset from an Asset bundle, nor in a built standalone (in this case, it doesn’t matter if the asset already exists in the scene, or if it was loaded from an Asset bundle).
“Not working” means there is no cross fade, instead both LOD meshes become visible for a brief moment (with full opacity) during transition.
I’m not sure what causes this… Originally I was thinking this was caused by shader stripping, but adding the shader in question to the “Always included shaders” in the graphics settings didn’t help (this just bloats the final shader and massively increases build times). I’m not even sure if this is related to ShaderGraph at all?
The only ugly “workaround” I’ve found so far is adding “LOD_FADE_CROSSFADE” as local keyword to the shader graph (set to Multi-Compile and having the “Default” box checked). This results in a (harmless) warning as this is apparently already declared as global keyword, but now cross fade works for assets loaded from asset bundles and also in built standalones
Only exception: It does not work for shadow caster, they still suffer from the same issue described above (instead of having a smoothly fading shadows, shadows for both LOD models become visible for a brief moment).