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 Vertex Displacement Using Textures

Discussion in 'Shader Graph' started by fdiba, Apr 14, 2019.

  1. fdiba

    fdiba

    Joined:
    Aug 17, 2018
    Posts:
    6
    Hello is it possible to do vertex displacement based on a texture using the shader graph ?

    If so, can you help me to do it ?

    I can easily do some vertex displacement using noise but I can't figure how to do it with a texture.
     

    Attached Files:

  2. fdiba

    fdiba

    Joined:
    Aug 17, 2018
    Posts:
    6
    Ok I just had to use "Sample Texture 2D LOD" instead of "Sample texture 2D".
     
    RedHillbilly, NeatWolf and Jesus like this.
  3. Rodniid

    Rodniid

    Joined:
    Aug 11, 2018
    Posts:
    29
    You are my savior!!!!!!!!!!!!!!!!!!!!!!
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,994
    Weird , I thought LOD was only to gain control over mipmap. Do you know why this works and not the other?
     
  5. Oxeren

    Oxeren

    Joined:
    Aug 14, 2013
    Posts:
    120
    AFAIK at the vertex stage of a shader mip level is not chosen yet, so you have to specify it yourself.
     
    Olmi and laurentlavigne like this.
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    5,994
    oh interesting trivia, thanks!
    I'll keep that in mind