Search Unity

Question Shader instancing in UI Image possible?

Discussion in 'Shaders' started by FirstTimeCreator, Oct 16, 2022.

  1. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    hello,

    I have ran into an issue where I have created a custom image shader for a UI image element. I am wanting to brighten the images up by adding an emission to them, But it appears that instancing is not supported on UI images? All that I can get is an update to the actual material. No shared material or material instance.

    Just making sure this is the case.
    Thank you.
     
  2. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,546
    If this is a change you want shared across all UI using this shader, why not just make the emission a global value and do Shader.SetGlobalColor() ?
     
  3. FirstTimeCreator

    FirstTimeCreator

    Joined:
    Sep 28, 2016
    Posts:
    768
    No, I am using it on UI On screen indicators that need to be different colors.