Search Unity

[SRP] Default Lit Shader - Mismatched materials in build - Universal Render Pipeline

Discussion in 'Editor & General Support' started by wayfray, Feb 15, 2020.

  1. wayfray

    wayfray

    Joined:
    Oct 10, 2014
    Posts:
    6
    Hi,

    I'm having an issue with materials that use the Universal Render Pipeline/Lit shader. In the game build, it appears the wrong textures are being applied for those materials.

    It occasionally happens in editor as well, where for certain materials, different textures appear depending on the view angle in the scene view. The problem usually goes away after restarting the editor, but still happens when making a build.

    Does anyone know of this issue / troubleshooting steps I could take / relevant resources?

    EDIT: It seems the issue can be fixed by disabling 'SRP batcher' in the pipeline settings.

    Intended result:
    screen_1920x1080_2020-02-14_22-54-00.png
    Buggy behaviour in game build:
    material_textures_error_urp.jpg


    A possibly related error code I get is this (I use Amplify Shader Editor for some of my shaders):
    Shader properties can't be added to this global property sheet. Trying to add _GrabTexture_HDR (type 1 count 1)
    UnityEditor.Rendering.Universal.MaterialReimporter:ReimportAllMaterials()
     
    Last edited: Feb 15, 2020
unityunity