opengl - Triangulate a quad with a hole in it using tessellation -
is possible triangulate quad hole in using tesselation shader? example,
- imagine have quad.
- then want make hole center of quad.
- 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
Post a Comment