// These pass-through vertex, geometry, and fragment programs are 
// used by gs_simple.c

// Vertex pass-through program for 2D positions with color
void vertex_passthru(float2 position  : POSITION,
                     float4 color     : COLOR,
                     
                 out float4 oPosition : POSITION,
                 out float4 oColor    : COLOR)
{
  oPosition = float4(position,0,1);
  oColor    = color;
}

// Geometry pass-through program for colored triangles
TRIANGLE void geometry_passthru(AttribArray<float4> position : POSITION,
                                AttribArray<float4> color    : COLOR)
{
  for (int i=0; i<position.length; i++) {
    emitVertex(position[i], color[i]);
  }
}

// Fragment pass-through program
float4 fragment_passthru(float4 color : COLOR) : COLOR
{
  return color;
}