i want to discard vertices in the geometry shader.
found a little example:
maxvertexcount(3)
void GS(
triangle VS_OUT vertices3,
inout TriangleStream<GS_OUT> outStream,
)
{
if (someCondition) // someCondition is a boolean that represents your condition
{
outStream.Append(vertices0);
outStream.Append(vertices1);
outStream.Append(vertices2);
}
else
{
// do not append to outStream, effectively discarding the output
}
}
concerning the conditions:
i saw a pic in the forum some time ago. seemed like cutting out vertices by texture. is this possible?