GeometryShaderAttribute

Description

sealed class Tinman.Gpu.Semantic.GeometryShaderAttribute

Derived from

Attribute abstract

The annotated method is the top-level entry point for a Geometry Shader (GS), for example:

[GeometryShader(TRIANGLE, TRIANGLE, 6)]
public static void GS_GeometryShaderMaterial(DataIn[] data, STREAM<DataOut> stream)
{
  gxStreamAppend(stream, ...);
  gxStreamAppend(stream, ...);
  gxStreamAppend(stream, ...);
  gxStreamReset(stream);
  gxStreamAppend(stream, ...);
  gxStreamAppend(stream, ...);
  gxStreamAppend(stream, ...);
}

A Geometry Shader method must have exactly two parameters:

  1. An array of StageInOut struct values (which has an implicit fixed size that correlates with the Input topology). Must be named 'data'.

  2. A STREAM object (where T is a StageInOut struct type) that outputs a primitive strip according to the Output topology. Must be named 'stream'.

The return type of a Geometry Shader method must be CxTypeSimple.Void.

Public / Constructors

Geometry​Shader​Attribute


public constructor GeometryShaderAttribute → (3)

input in : int32

See Input.

output in : int32

See Output.

vertexCount in : int32

See VertexCount.

Creates a new instance of GeometryShader.

Public / Attributes

Input


public attribute Input → (int32)

The input topology.

Output


public attribute Output → (int32)

The output topology.

Vertex​Count


public attribute VertexCount → (int32)

The maximum number of vertices that may be output by the shader.