Is it valid to emit less than max_verts from a GS?

I have a geometry shader that does some manual culling in order to reduce the number of vertices that it emits. Initial tests indicate that this is indeed a performance win.

However, I just wanted to make sure it’s valid to emit less than the declared max_vertices from a geometry shader.

The reason I ask, is because my NVidia card is rendering the geometry correctly along with a bunch of stray verts. When I disable the variable vertex emission code, everything renders as expected with no stray verts.

On ATI, everything is rendered correctly in either case.

Thanks.

P.S. This may end up needing to be moved into the driver section.

Yes, it is valid.

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