Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualcippyboy

Posted 02 October 2013 - 03:53 PM

If anyone stumbles upon this, I figured out where to get the barycentric coordinates from, GL 4.0 tesselation factors (more specifically I wrote the values out with a shader storage buffer smile.png ) but there's a small caveat, you don't get indices for those barycentric coordinates. So like you get 7 sets of coordinates but there's 6 triangles involved (for level 2). I'll probably write my own barycentric generator and the related indices to go along with it. I also switched the technique a bit to get vertex data from uniform buffers, the small problem here is that you're limited to around 1024 vertices in a uniform buffer, but those are the initial vertices anyway, the tessellated mesh will have that times the number of instances, so in theory you can get to high numbers pretty fast.

 

UPDATE : Section 2.X.2.1 of the ARB_tesselation_shader spec seems to go in detail about those coordinates.

 

http://www.opengl.org/registry/specs/ARB/tessellation_shader.txt


#1cippyboy

Posted 02 October 2013 - 07:56 AM

If anyone stumbles upon this, I figured out where to get the barycentric coordinates from, GL 4.0 tesselation factors (more specifically I wrote the values out with a shader storage buffer :) ) but there's a small caveat, you don't get indices for those barycentric coordinates. So like you get 7 sets of coordinates but there's 6 triangles involved (for level 2). I'll probably write my own barycentric generator and the related indices to go along with it. I also switched the technique a bit to get vertex data from uniform buffers, the small problem here is that you're limited to around 1024 vertices in a uniform buffer, but those are the initial vertices anyway, the tessellated mesh will have that times the number of instances, so in theory you can get to high numbers pretty fast.


PARTNERS