Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

UI Shader - multiplying 9-sliced sprite with non-nine-sliced texture?

Discussion in 'UGUI & TextMesh Pro' started by travisschau, Apr 11, 2021.

  1. travisschau

    travisschau

    Joined:
    Mar 27, 2013
    Posts:
    13
    Hi,
    I'm attempting to use the Shader Graph to put a parchment effect on my UI, by multiplying the main sprite with a parchment texture.

    Trouble is, my UI sprite is 9-sliced, and the 9-slice is applying to the parchment texture as well. In the image below, you can see how the 9-sliced stretches the parchment grain way out. Ideally, I would just set the parchment texture to repeat, unaffected by the 9-slice.

    Images show the shader graph I've got set up, and the result.

    Does anyone know a way to work around this, for the desired result? My goal is to use this shader in a lot of places to avoid the need for individual big textures for different UI panels.

    Or any suggestions for a better way to accomplish this?

    Screen Shot 2021-04-11 at 2.36.09 PM.png
    Screen Shot 2021-04-11 at 2.35.55 PM.png
     
  2. doctor_zeus

    doctor_zeus

    Joined:
    May 4, 2023
    Posts:
    2
    Any luck on finding a solution for this? I have the exact same issue with uv overlay animation.