Possible to stitch 2 meshes in geometry shader?

Hello everyone,

Suppose I sent a triangle and a quad to the geometry shader, and then want to stitch the 2 together like in the picture. Also remove the dashed line in the picture. Is this possible? Thanks.

Yes it is possible.

Geometry shader designed for massive parallel per primitive operations. For such a purpose like yours, it’s not very suitable istrument. If this is a single operation, it is better to doing it by CPU.

Principle - yes.

Principle - yes. [/QUOTE]

This is my concern since geometry shader can only see one triangle at a time so I’m really not sure on how to let it detect where the 2 meshes are crossed.

Without having really thought everything through, I would guess that, while it could be possible to do it in a geometry shader:

1: it wouldn’t be possible for two arbitrary polygons.

2: it would probably not be worthwhile performance-wise.

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