Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Question how to adjust this wind shader for tiles in world space?

Discussion in 'Shader Graph' started by Lunte, Jul 23, 2022.

  1. Lunte

    Lunte

    Joined:
    Nov 14, 2020
    Posts:
    6
    Hey guys!
    I have a working wind shader, but the problem is it doesnt work in world space. So where the tiles meet i create this gap that i dont want. does somebody have a solution for this?
    grasstiles.gif
    Wind Shader.png
     
  2. Lunte

    Lunte

    Joined:
    Nov 14, 2020
    Posts:
    6
    bump
     
  3. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    481
    Try to simply add your calculation to a Position set to Object node, instead of the world to object transformation. You already compute that noise in world space.
     
  4. Lunte

    Lunte

    Joined:
    Nov 14, 2020
    Posts:
    6
    ty. i know but it doesnt seem be shown in world space because its not in sync. so i cut the transformation node and changed the last position node from world to position. it is a little different but the tiles are still not in sync :/
     
  5. Qriva

    Qriva

    Joined:
    Jun 30, 2019
    Posts:
    1,123
    I don't understand why it's not in sync. It's like there is no way to be desynchronized as long as both of these vertices are in the same position. It would be better if you shown a bit more about your meshes layout.
     
  6. Lunte

    Lunte

    Joined:
    Nov 14, 2020
    Posts:
    6
    It works! Thank you! It had to do something with the transparent parts at the border of the tiles. I had to put a 1% opacity white rectangle at the sides to artificially make the boundaries same size. The only problem now is its barely visible so i have to find an elegant solution to this.
    Edit: I also decreased the fill in photoshop to 20% now its not visible. Thank you both! :)
     
    Last edited: Aug 7, 2022