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 Moving pixels about

Discussion in 'Shader Graph' started by henners999, Jun 18, 2023.

  1. henners999

    henners999

    Joined:
    May 30, 2020
    Posts:
    33
    I’d like to create a shader that moves pixels on a plane as a car moves over them. Can I do this using the shader graph and a raycast?

    I’m a total shader noob so am throwing words around that I don’t understand completely! Any guidance useful.
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Could you describe this differently? Don't understand what you mean with moving pixels
     
  3. henners999

    henners999

    Joined:
    May 30, 2020
    Posts:
    33
    I meant that as the player moves about the map it would displace the texture around it. So the texture under the player would move sideways to the car simulating a turbulence effect. Does that make sense?
     
  4. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    That's not moving pictures. You can look for guides on how to make ripples etc.
    This really depends on what you Exactly want
     
  5. henners999

    henners999

    Joined:
    May 30, 2020
    Posts:
    33
    Thanks for help. Reading around a bit maybe mesh deformation would work if I attach the material to a new mesh?
     
  6. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,362
    Again, depends on the exact result you want. Shaders will be the fastest way to implement this, and you could use the vertex shader