   tesselation questions
  I have gotten tesselation to work with triangles however, there are always seams in the mesh. What is the proper order of the edge tess factors? here is what I assume now and it appears to be wrong.ConstantOutput ConstantsHS(InputPatch<ControlPoint, 3> ip,    uint PatchID : SV_PrimitiveID ){    ConstantOutput Output;Output.Edges[0] = ComputeTesselationFactor(ip[0].Position,ip[2].Position);Output.Edges[1] = ComputeTesselationFactor(ip[0].Position,ip[1].Position);Output.Edges[2] = ComputeTesselationFactor(ip[1].Position,ip[2].Position);Output.Inside = min(Output.Edges[1],Output.Edges[2]);   return Output;}
  First, are you doing any displacement on the tessellated triangles?And next, you'll need to be able to determine a mechanism for knowing how adjacent triangles will be tessellated so that your edges will match their neighbor's tessellation level.  There are several research papers and a white paper from both ATI and NVIDIA on tessellation that talk about how to organize everything to know exactly what these values should be for consistency.  You'll probably want to read those over and adapt them for your needs.Scott ShaeferATI:1234NVIDIA:1;  ok I am using a system that should generate consistent tess factors for adjacent edges, however I am still getting cracks with or without displacement. Here is my function for computing tess factors. I still cant find any info in the docs or otherwise that seems to tell me which vertices belong to which edge.Right now I am assuming edge 0 is v0-v1, edge 1 is v1-v2, and edge 2 is v2-v0. Can anyone confirm that that is correct. As a note if I hard code the tess factor there are no seams even with displacement. float ComputeTesselationFactor(float3 Pos1,float3 Pos2){float4 Position1;Position1 = Cube2Sphere(float4(Pos1,1));Position1 = mul(Position1,World);float4 Position2;Position2 = Cube2Sphere(float4(Pos2,1));Position2 = mul(Position2,World);float f = min(7.0,max(length(Position1),length(Position2))/length(Position1-Position2));if(f < 1){return 64;}else if(f < 2){return 32;}else if(f < 3){return 16;}else if(f < 4){return 8;}else if(f < 5){return 4;}else if(f < 6){return 2;}return 1;};  Most small cracks are probably related to subtle precision issues due to the way the math is run on the vertices of adjacent edges.  In short, when using a vertex to do calculations related to tessellation, that vertex must always follow the exact same code path every time it's used.  If it uses a different code path then it will suffer from tiny differences due to optimizations and order of instruction changes.  That might mean that you need to flip adjacent triangles edges when feeding them to your function so that pos1 and pos2 have the same order.Example that would cause a precision difference between adjacent edges:    tri1pos1 ---------> pos2    ComputeTessellationFactor(pos1,pos2); pos2 <--------- pos1    ComputeTessellationFactor(pos1,pos2);    tri2Correct:    tri1pos1 ---------> pos2    ComputeTessellationFactor(pos1,pos2); pos2 <--------- pos1    ComputeTessellationFactor(pos2,pos1);    tri2The papers I linked to discuss methods of for keeping track of when this flipping needs to be done.You may also find it helpful to use the 'precise' keyword to label variables that need to stay IEEE safe during optimization.   ;  understood but you haven't answered the question of whether I am correct as to which vertices go with which edge factor. All examples and samples either use quads or have a fixed tess factor for the entire mess.   ;  The tess factors are interpreted with clockwise winding order when applied to a patch (uvw for a triangle).  The tessellator actually needs only the tessfactors along with the meta data (domain, maxtessfactor, outputtopology, partitioning ) in order to do its job.No assumptions are made on the control point layout of the patch which allows the developer to do whatever they like in the hull shader and the domain shader.   ;  ok then in simple terms you mean to say that the edges are the based on the order of the vertices in the triangle and edge[0] is vertex[0] - vertex[1] etc.   