Run geometry shader over newly-created geometry?

F861248e62fd7640cb766decacdb1d15
0
Tottel 101 Jun 08, 2012 at 11:02

I’m trying to subdivide a quad (2 triangles) multiple times.

I send it to the geometry as triangleadj and ouput 8 triangles from that.
However, I want to subdivide multiple times and someone told me I can send the geometry output back to the vertex shader and run the geometry shader again on that new geometry. He couldn’t tell me how though.

Does anyone have any experience, or tips about this? I’m using DirectX10, so I cannot use tesselation instead.

Thanks.

3 Replies

Please log in or register to post a reply.

B20d81438814b6ba7da7ff8eb502d039
0
Vilem_Otte 117 Jun 08, 2012 at 11:58

You can stream out geometry shader output to vertex buffer. Then you can re-render it using same shader (and again stream out the result), etc. unless u have enough tessellated geometry.

The other way is to write multiple-times tessellation directly in geometry shader (also possible! though it’s still a lot slower than using DirectX 11 tessellation or GL_ARB_tessellation_shader in OpenGL 4 and higher.

Note, that second way might be faster than first one ;).

F861248e62fd7640cb766decacdb1d15
0
Tottel 101 Jun 08, 2012 at 12:00

Thanks, How exactly do you stream out back to the vertex buffer?

A8433b04cb41dd57113740b779f61acb
0
Reedbeta 167 Jun 08, 2012 at 16:25

Tottel, see the MSDN docs for the details of how to set it up.