Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualcippyboy

Posted 16 September 2013 - 06:31 PM

I was thinking about a way to do tessellation under OpenGL ES 3 using instancing. What I thought about doing is store 3 times the vertex data per vertex ( the 3 constituent vertices of a triangle, while ofcourse giving up on indexing ) and then set up a uniform block with the barycentric coordinates and using instancing I could render 3*n triangles per each original triangle and then interpolate for their final values. This will later on be coupled with vertex shader texture sampling into a depth map. This all sounds good in theory but I'm wondering if there is already out there a library of some sort to give me an n-complexity set of barycentric coordinates for sub-triangles. Like n=1 (instance) would result in 1,0,0 - 0,1,0 - 0,0,1 or the original triangle. n=3(instances) would create a vertex inside the triangle and the 3 related sub-triangles. I know GL4+ hardware does this, I'm looking for some already written code that does this, if you happen to know.
 


#1cippyboy

Posted 16 September 2013 - 06:30 PM

I was thinking about a way to do tessellation under OpenGL ES 3 using instancing. What I thought about doing is store 3 times the vertex data per vertex ( the 3 constituent vertices of a triangle, while ofcourse giving up on indexing ) and then set up a uniform block with the barycentric coordinates and using instancing I could render 3 triangles per each original triangles and then interpolate for their final values. This will later on be coupled with vertex shader texture sampling into a depth map. This all sounds good in theory but I'm wondering if there is already out there a library of some sort to give me an n-complexity set of barycentric coordinates for sub-triangles. Like n=1 (instance) would result in 1,0,0 - 0,1,0 - 0,0,1 or the original triangle. n=3(instances) would create a vertex inside the triangle and the 3 related sub-triangles. I know GL4+ hardware does this, I'm looking for some already written code that does this, if you happen to know.
 


PARTNERS