Search Unity

Question Texture Stretching

Discussion in 'Shader Graph' started by barbamix, Nov 27, 2022.

  1. barbamix

    barbamix

    Joined:
    Apr 6, 2018
    Posts:
    15
    Hi.

    I have been using the following setup to animate scrolling for the texture of my object. It's working fine but I don't want the texture to stretch if I resize the object (see on the resized cubes). I want the texture to repeat. What should I add to prevent stretching?


    stretching.PNG
    stretch.PNG
     

    Attached Files:

  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,442
  3. barbamix

    barbamix

    Joined:
    Apr 6, 2018
    Posts:
    15
    I have been testing and came close with this setup however I just cant figure out why only top and bottom doesnt stretch.
    Side faces are still stretching. This is default cube btw.

    Any ideas?

    scroll2.PNG
    scrollss.PNG