6.3. Using PLUG_geometry_vertex_xxx

Sometimes using the /* VARYING-PASSTHROUGH-GEOMETRY-SHADERS */ comment is not enough and you want to manually control how the geometryVertexXxx functions are extended.

In this case, override plugs PLUG_­geometry_­vertex_­xxx. The exact specification of these plugs is in Section A.4, “Geometry shader plugs”. Overriding these plugs allows to pass-through or blend custom vertex attributes needed by the effects. By correctly overriding them, the user effects can work regardless if the geometry shader is linked or not.

To override these plugs, use an EffectPart with type set to "GEOMETRY".

Note that we are smart when the geometry shader stage is used: it is only used if you provide a geometry shader with a main() entry point. Otherwise, the geometry shader stage is simply skipped, even if some EffectPart with type="GEOMETRY" are present.

Our goal throughout this paper is to make effects independent from each other, and composable with each other. All kinds of effects, including geometry shader effects, may be created and applied independently from each other. Placing two or more effects together on the X3D effects field makes them automatically cooperate.