How does the InsideTessFactor affect points of a triangle in a DirectX11 domain shader?

In the image above, I can understand the value of SV_TessFactor because for every side of this triangle, there are 4,1,6 line segments respectively. But I don't understand how InsideTessFactor is 5.

There are 12 points and 12 line segments inside the triangle. It seems to me that 12 is not relevant to 5.

You can understand this as a continuation of the two preceding diagrams in the document you linked:

For an inside tesselation factor n, we first imagine that each of the sides of the outside triangle have been subdivided into n segments.

Then we draw a perpendicular up from each of the newly-added vertices. Where the two perpendiculars closest to a corner intersect, we place the corners of our next inner triangle (blue).

The other perpendiculars add vertices where they cross this triangle's sides. That means that for a triangle tessellated by a factor of n, this inner triangle has n - 2 segments along each side.

Then we repeat to make a nested inner triangle (or point), until we have no more vertices in the middle of a subdivided edge to draw perpendiculars from.

So when the inside tessellation factor is 5, that first inner triangle in blue has 5 - 2 = 3 segments along each side.

You'll note this inner 3-segment triangle for the 5 case in my diagram matches the 3-segment inner triangle in your question. All that differs are the number of segments on the outer triangle's sides, controlled by the other tessellation factors.

• Thank you so much,DMGregory,this perfectly solved my question.The illustrations here are very informative. Feb 26, 2021 at 2:36