Jump to content
  • Advertisement
Sign in to follow this  
Atridas

OpenGL Combining Tesselation with Geometry shaders

This topic is 2646 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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...

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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...)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!