Search Unity

Bug URP Shader Graphic 'replace color' doesn't work on mobile

Discussion in 'Shaders' started by DragonCrystal, Jun 10, 2022.

  1. DragonCrystal

    DragonCrystal

    Joined:
    May 26, 2021
    Posts:
    2
    Hey.

    I'm creating a shader to replace the sprites colors, the shader is created from the 'replace color' of the URP Shader Graph.

    The shader works perfectly in the editor and on windows, but it doesn't work on mobile, it's as if the '_from' field only recognizes the white color.

    Do you know how I can resolve this? I'm frustrated.

    Attached you can see how the shader is assembled.
    I'm using unity LTS 2021.
     

    Attached Files:

    • PT1.png
      PT1.png
      File size:
      100.7 KB
      Views:
      189
  2. camillazi

    camillazi

    Joined:
    Sep 28, 2020
    Posts:
    6
    Anyone or any workaround for this? I'm having the same issue with Replace Color on android. I'm using LTS 2020.
     
  3. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    If the texture is using compression the colors can change slightly.
     
  4. camillazi

    camillazi

    Joined:
    Sep 28, 2020
    Posts:
    6
    Hi, I'm using pixel art with sprite compression set to None. Tested the shader in PC build and works. It's in android that it's not working. I have almost the same shader graph as @DragonCrystal
     
  5. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    5,060
    1. Does this work properly in windows builds? (To check if it's just android or a general build issue)
    2. If yes, I suggest filing a bug report for this issue