Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

Question Random tiling to prevent repetition

Discussion in 'Shader Graph' started by newguy123, Oct 7, 2021.

  1. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Hi Guys

    How can I prevent the obvious repeating tiling and maybe randomly roate each "tile"?
     
  2. rob11

    rob11

    Joined:
    Mar 7, 2017
    Posts:
    59
    Every shadergraph instance will produce the exact same results unless you give it different inputs. One way to do it would be to use the Instance ID node and multiply it by a factor to get a random seed for every instance. You could also use the world position to give an offset to your effect.
     
  3. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Great, now what is all that in plain english?

    Or better yet, can you draw me a picture or show me an example graph please?
     
  4. Alesk

    Alesk

    Joined:
    Jul 15, 2010
    Posts:
    340
  5. Olmi

    Olmi

    Joined:
    Nov 29, 2012
    Posts:
    1,553
    @newguy123 if you want something that is a bit more retro and literally rotate tiles, you could rotate UVs for each "tile" in your UV. This works for a single quad/triangle and is not geometry based. You could also mirror the tiles or manipulate them in other ways.

    But here's a simplified example I cooked up, I modified one of my old shader graphs. Hopefully you can get some ideas from this. (zoom in to the image to see the details...)

    20211012_rotated_UV_tiles.PNG
     
    dannyr83 and newguy123 like this.
  6. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    Thanks @Olmi this is exactly what I'm looking for, except I would also like to blend the edges of each tile into each other so you dont see the seem/edge of each UV tile
     
  7. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248