Search Unity

Question Combining Tessellation with vertex displacement?

Discussion in 'Shader Graph' started by dgoyette, Jun 29, 2022.

  1. dgoyette

    dgoyette

    Joined:
    Jul 1, 2016
    Posts:
    4,196
    I have a shader that deforms the vertices of a mesh in a direction. For example, here's an object getting displaces to a singularity:

    upload_2022-6-29_13-53-40.png

    The approach is is fairly simple, and it looks a bit awkward on simpler models that have fewer vertices. You can see in the screenshot that the orange platforms only have about 6 verts per edge, so the curve doesn't look very smooth as it deforms.

    I thought I might be able to add Tessellation to the shader, to give it more verts to work with. But I'm not sure how to combine them. My shader currently assigns a value to the "Position" of the "Vertex" portion of the shader. But Tessellation is a sibling to Position. I can add tessellation to my shader, but I can't feed the tessellated verts into my logic that determines vertex position.

    Is there a way to assign a proper Position value for tessellated verts?
     
  2. silverx69

    silverx69

    Joined:
    Nov 8, 2019
    Posts:
    4
    Hello, did you ever find a solution to this? I'm having the same problem.

    EDIT: Nevermind. Just connect the end of your logic to the Tessellation Displacement property instead of to the Position property
     
    Last edited: Mar 15, 2024