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. Dismiss Notice

Question 2D Shader mask sprite distortion

Discussion in 'Shader Graph' started by sergiblacksmith, May 12, 2021.

  1. sergiblacksmith

    sergiblacksmith

    Joined:
    Mar 23, 2020
    Posts:
    2
    I've been messing around with shader graph trying to make an "underwater" mask effect.
    The idea is that all the sprites that are behind the shader make a sinusoid movement, like if it was underwater.

    I'm trying to replicate this:

    https://mobile.twitter.com/therujik/status/1208035937671884800?s=12

    I got everything working up to step 6, but in step 7 he adds this sinusoid effect.
    I don't know how to replicate this effect with Shader Graph.
    Here is what i got so far:
    upload_2021-5-12_17-35-34.png
     
    Last edited: May 12, 2021
  2. sergiblacksmith

    sergiblacksmith

    Joined:
    Mar 23, 2020
    Posts:
    2
    Found the solution.
    Just had to create another land tile with a distortion shader and use "Sprite Mask" component in the water object to show the distorted tiles.