Search Unity

Bug Black textures on Android

Discussion in 'General Graphics' started by hickv, Nov 25, 2022.

  1. hickv

    hickv

    Joined:
    Oct 31, 2018
    Posts:
    40
    Unity 2021.3.14f1 LTS
    URP 12.1.8

    Help

    I am getting a weird bug where all my shader-graph shaders have black textures. Whats even more odd is that they still alphatest correctly. I attached a logcat.txt in case anyone can help.

    Thanks

    boxes_player.png boxes_editor.png

    tree_player.png tree_editor.png

    EDIT 1:
    Just found out that it is a texture issue and not a shader issue. I managed to compile the shaders just fine on a second project. However the textures for some reason become black on builds.
     

    Attached Files:

    Last edited: Nov 26, 2022
  2. hickv

    hickv

    Joined:
    Oct 31, 2018
    Posts:
    40
    Alright I managed to fix it. I will explain just in case some gets to a similar problem.

    What I said in 'EDIT 1' was incorrect - the error was URP 'LIT' shader related and NOT texture related as I initially concluded (a separate bug that led me to false-positive think it was texture related).

    For some reason all Lit shaders were rendering black (as well as ShaderGraph Lit-derived shaders).

    I believe what caused the issue was me downgrading from version '2022.1.23f1' to '2021.314f1 LTS'. The downgrade somehow corrupted shaders ? I have no idea since eveything works fine in Editor.

    The reason I downgraded is because '2022.1.23f1' has a 'Access denied' bug when building (unrelated to post).

    I fixed the black rendering issue by creating a blank URP project on the mentioned LTS version and just porting/moving all my assets over.
     
    diasrodrigo and DevDunk like this.