# How is displacement tessellation done?

I'm curious because I was thinking that displacement mapping is done in the shader file only inside the domain shader. Am I correct or is it both implemented in the rendering section of the mesh and shader? So, if I make a cube for an example, I would have to read out the displacement map file then tell what vertices get positioned inside the render or only in the shader file? I'm a bit stuck on that concept.

These are the snap shots done inside the game editor of a plane. I believe the issue lies within the texture but you can always correct me.

This texture was created for the box inside 3DS Max and the UV Mapped, then baked the image.

When I load a sphere, not so much crazy gaps but it's still hasty.

pos.xyz += normal.xyz * (sampledValue - 0.5f) * displacementStrength;

• @SICGames2013 As for the whole mesh moving, that's probably because float3(0.0f,1.0f,0.0f) * (sampledValued * 10.0f) is just displacing everything along the y axis. That's not going to work right for surfaces that are oriented parallel to the y axis. – Nathan Reed Nov 18 '13 at 16:49