HI all!
We recently upgraded a project from 6000.1.8f1 to 6000.2.13f1 and are now encountering a really strange issue in our builds (across multiple platforms).
Some of our shaders are not being drawn in the normal draw opaque/transparent phase of rendering. I have confirmed the correct shader variants are compiled at build time, but for whatever reason only some of them get compiled at runtime. And if I make a build with only a single object which uses a single shader that is known to be faulty, the opaque drawing phase of rendering is just completely skipped, as if Unity thinks there is nothing to draw. However the shader rendering and depth drawing phases work, and Shadow Caster/Depth Normals variants are compiled at runtime.
I have tried creating a new project on the same version of Unity, but it does not exhibit the same issue, even after doing the following:
- Exporting the URP asset and Universal Renderer Data asset from the faulty project into the working project.
- Matching Player, Graphics, and Quality settings between the two projects.
- Exporting a prefab whose shader is known to be missing in the faulty project to the working project (displays fine there with correct passes included).
- Using Addressables on both projects to make sure it wasn't some new addressable related issue. In any case, there are shaders which are included with the player build which are also not working, and shaders which are included with addressables that are working.