0

I am wondering whether a Tessellation Evaluation Shader (TES) can somehow output adjacency information that can then be used by a Geometry Shader (GS).

Let's take as example a TCS/TES combination rendering some isocurves using layout (isolines, equal_spacing, ccw) in. Subsequently using layout (lines) in in the GS works, though layout (lines_adjacency) in does not. I know that adjacency information has to be provided explicitly in the case where no TCS/TES are present (e.g. using an updated list of indices and glDrawElements using GL_LINES_ADJACENCY), but is there a way to let the TES generate this information? Reading this section it seems that this information cannot be generated automatically — hopefully I'm overlooking something.

The application that I have in mind is to draw thick smooth curves, i.e. first generating lots of vertices and connecting them with line segments using tessellation, and subsequently replacing these line segments by triangle strips like explained here.

A very similar question has been asked before here, so far without conclusive answer.

Ailurus
  • 731
  • 1
  • 10
  • 23

1 Answers1

0

The tessellation primitive generator only generates sequences of point, line, or triangle primitives, based on the abstract patch type and point_mode generation. It never generates strips/fans/lists, and certainly not adjacency primitives.

What you want would be better handled by having the TES generate additional per-vertex data, which the GS will use to do whatever you wanted the adjacency information for.

Nicol Bolas
  • 449,505
  • 63
  • 781
  • 982