Implementing silhouette extraction with tessellation

I am in the middle of updating my older fixed-pipeline Opengl NPR application for terrain rendering under GLSL. The previous version used the old NURBS facility (very slow, but effective); the new one is using GLSL with PN triangle tessellation. I have hatch shading working for tessellated triangles but now I’m stuck on implementing silhouette extraction. As I’m sure you all know, I need to be able to find adjacent forward-facing and rear-facing triangles to define my silhouette edges. Unfortunately, I’m having a hard time trying to figure out how to get adjacency information while using tessellation shaders.

I’m using a patch data structure in the TCS based on a tutorial at the ogldev site. I might be able to mess around in the TES to find normals for adjacent tessellated triangles within a single PN triangle facet. Another technique would seem to be to send the output of the TES (as triangle primitives) through the transform feedback buffer, look for adjacent triangles, and evaluate visibility that way. I’ve seen suggestions on this forum and elsewhere that this technique would work but I haven’t seen any references to implementations.

Neither of these techniques seem to be very straightforward and I feel like I might be missing something fundamental here. Does anyone have this working or can you point me to a reference? Thanks!


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.