Search Unity

Question Shader-Graph randomly tiled sprite

Discussion in 'Shader Graph' started by theCodeHermit, May 26, 2020.

  1. theCodeHermit

    theCodeHermit

    Joined:
    Sep 20, 2018
    Posts:
    39
    Lets say I have a shader with a clean white tile. Then I use it on a wall and tile it a few times.



    I also have a sprite with numbers.


    Now, is it possible(with Shadergraph) and if yes how. To put a random sprite number on top of the already tiled texture. Example:
     
  2. elsharkawey

    elsharkawey

    Joined:
    May 15, 2016
    Posts:
    41
    any solution ?
     
  3. theCodeHermit

    theCodeHermit

    Joined:
    Sep 20, 2018
    Posts:
    39
    Not really... I ended up setting the texture to repeat in unity export settings. Then set a random offset tiling in shadergraph. It creates a similar effect, though its kinda tricky to implement and in larger wall sizes you will see the texture repeat clearly.