[SOLVED] Tessellation on IcoSphere
Note sure if I follow your problem right, but if you got your tesselation factor calculation right, the geometry shouldn't matter. Hold on, I grab my tesselation test scene and feed it a icosahedron icosphere.
What SDK and especially what shader compiler version are you using ? I once had a bad bug with the June 2010 SDK compiler in conjunction with tesselation factors.
Update: Hmmm, maybe I understand better now. The link you gave uses quad tesselation. For triangles one needs to know this
And jep, my tesselator has no trouble with an icosphere (had to make one first).
Edit: By the way, nice screenshots!
As long as neighboring patches share the same control points, and the control point to tessellation factor algorithm will produce the same output for the given input control points, then the order doesn't make any difference.
_output.Edges[0] = floor(min(vertex1, vertex2));
_output.Edges[1] = floor(min(vertex0, vertex2));
_output.Edges[2] = floor(min(vertex0, vertex1));
if (inputpatch[3].Model_VertexPosition.x == 1.0 && inputpatch[3].Model_VertexPosition.y == 3.0 && inputpatch[3].Model_VertexPosition.x == 2.0)
{
_output.Edges[2] = floor(min(vertex1, vertex2));
_output.Edges[1] = floor(min(vertex0, vertex2));
_output.Edges[0] = floor(min(vertex0, vertex1));
}
Results (other edges are working correctly) :
Oh.............................
Nevermind... Forget all my posts....
All the troubles were caused by the SDK June 2010 !!!
All is working very well now !! ;)
Thank you again for your help !!
If someone has the same problem, you need to add this in the hull shader file :
#if D3DX_VERSION == 0xa2b
#pragma ruledisable 0x0802405f
#endif
All this drawing and posting time just for a little bug....
Glad to hear it's working. And thanks for that link. I did not know one could "patch" the compiler this way. It's also good to know the bug is actually documented.
I'd still recommend using a newer compiler: Read here!
All this drawing and posting time just for a little bug....
Tell me about it. It isn't little if it's not your fault - since you look for compiler bugs last (if at all). And waste time.