opengl - Triangulate a quad with a hole in it using tessellation -


is possible triangulate quad hole in using tesselation shader? example,

enter image description here enter image description here enter image description here

  1. imagine have quad.
  2. then want make hole center of quad.
  3. there need lot more of vertices make hole.

and questions:

  • can using tessellation shader? if so, how?
  • should use geometry shader instead?

that not typical application of tessellation shader, , that's not done. basically, have coarse 3d model, passed graphics card. graphics card implements tessellation algorithm, creates more refined 3d model tessellating primitives.

you have supply 2 shaders: tessellation control- , evaluation shaders (in opengl terms)

in tessellation control shader can "parameterize" tessellation algorithm (inner , outer tessellation factors etc). tessellation algorithm applied. thereafter tessellation evaluation shader used to, e.g. interpolate vertex attributes fine vertices.

what want reminds me of csg (http://en.wikipedia.org/wiki/constructive_solid_geometry). it's true tessellation shader creates new data, may paramterize algorithm. cannot "implement" tessellation algorithm. ad geometry shader: it's true can emit (limited amount of) new primitives, not apply problem.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -