Skip to main content
GameDev.net gamedev.net
🔒 Locked

Combining Tesselation with Geometry shaders

Started by Atridas Aug 21, 2011 at 7:49 PM 1 replies 2.1k views
Original Post
Atridas
Atridas
Hi.

I'm starting to play with OpenGL 3/4 stuff, geometry and tesselation shaders mostly, to rework the renderer of my engine to include the newer functionality.

So far I've been able to make some samples working with geometry or tesselation shaders, but I can not take profit of both.

The problem is: the main algorithm I need to make the effects I want in the geometry shader is siluethe detection. And to do siluethe detection I need adjacency information, wich I can send from the main aplication (triangles_adjacency{_strip}) but not from the tesselation unit, wich only sends triangles, quads or isolines (neither with adjacency).

Has someone found a good workarround, or should I scrap tess shaders alltogether and use only geometry shaders and tesselate from there?

Atridas.

P.S.: Excuse my english, it is not my native language. I expect I didn't write anything horrible...
Decibit
Decibit
Though I haven't tried the tessellation in OpenGL, I'm quite sure that the geometry shader that expects adjacency information is invalid when the tessellator is active in DIrect3D. (MSDN) The both APIs use the same hardware and generally tend to converge. So I would expect that the trick that you want to achieve is not possible.
If anyone has a good workaround I would be interested to know about it myself.
Atridas
Atridas
I was hoping to have missed something, but it seems I'll have to find the workarround.

I've got some ideas but they aren't perfect, and I haven't got the time to test them. One whould be to tesselate in the geometry unit, which wastes the paralelization tess shaders brings you. The other whould be to compute aproximate adjacency points in the tess evaluation using adjacency points passed as vertexes in the patch (Adjacency within the triangle shouldn't be hard to compute, but you're just wasting a lot of computation repeating points you computet somewhere else. The tricky ones are those outside of the triangle...)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.