This gear asset uses a material with the stock URP Lit shader. It has a base map, a normal map, and a metallic map.
If it’s at all relevant, the mesh was modeled in Blender, and the maps were baked in Substance 3D painter. I’m hoping the issue is agnostic to that – but I’ve considered something like a format issue in the assets that is rectified in the scene, but for some reason not fixed when being built as an addressable.
When included in a scene in the build index, it appears correctly.
When loaded as an addressable, (either in an addressable scene or, as pictured here, by loading manually at runtime), it appears with incorrect normals. See above for a RenderDoc capture of the DepthNormalPrepass. These captures are from play mode using the “Use Existing Build (Windows)” option in Addressables, but the results are identical in a standalone build.
I am using
- Addressables 2.3.7
- Unity 6000.0.28f1
- Universal RP 17.0.3
I’ve looked through existing posts on shader stripping issues with addressables. I have already tried disabling shader stripping altogether. I have also tried collecting a Shader Variant Collection in the editor, then packing that in the same addressable group as the Lit shader.
There seem to be several avenues to investigate here, so I appreciate guidance along any of them even without a complete solution:
- Is there a way to investigate which shader variant is being used? I would like to be able to rule out shader stripping issues. I’m considering decompiling the shaders in RenderDoc and comparing them between the different meshes.
- Is there anything else to look for in RenderDoc (or the frame debugger) that would point me in the right direction here?
- If the issue is stripped shaders, what more should I do to use addressable assets with the URP lit shader?
- What else could be going wrong when packaging up asset bundles and/or loading them that creates this visual issue?
Thank you in advance!
Edit: A few other things I have checked so far:
- Disabling compression on the addressable group, the textures, and the mesh.
- Swapping to a different normal map to see if anything changes – a different map does produce different results, so I know the shader is using the maps in some capacity. The results still differ between addressables and built in.