Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted ShaderGraph: access sprite secondary texture in shader for UI image

Discussion in 'Shader Graph' started by RedHillbilly, Jan 31, 2021.

  1. RedHillbilly

    RedHillbilly

    Joined:
    Mar 24, 2014
    Posts:
    19
    I have a sprite with the usual
    _MainTex
    and an additional
    _inner
    texture defined as secondary texture in the sprite editor.
    When I want to access this secondary texture for a material meant for the sprite renderer, I can just enter the "ref" as
    _inner
    in the
    Texture2D
    property, works like a charme.

    But when I try to do the same with the same sprite with a shader meant for a UI image (in-game UI), the shader does not appear to find the secondary texture (so the same shader works on my SpriteRenderer, but doesn't on my UI image renderer).

    Am I doing something wrong? Any idea what?

    Thanks
     
unityunity