   [DX10 GS] How to emit 2 new vertices from 1 vertex???
  hi guysI would like someone to help me figure out how to pass in 1 vertex to GS and have GS emits 2 other vertices to form a triangle. I have my FX file attached and in my main function, I just call Draw( 1, 0 ) to pass in 1 vertex. Does this sound right to you?My ultimate goal is to GS to emit as many vertices up to API max from 1 vertex. Many thanks!//------------------------------------------------------------------------------struct VS_INPUT{    float4 Pos   : SV_POSITION;    float4 Color : COLOR0;};struct GSPS_INPUT{    float4 Pos   : SV_POSITION;    float4 Color : COLOR0;};BlendState NoBlending{    AlphaToCoverageEnable    = FALSE;    BlendEnable[0] = FALSE;};DepthStencilState DisableDepth{    DepthEnable    = FALSE;    DepthWriteMask = ZERO;};//------------------------------------------------------------------------------// Vertex Shader//------------------------------------------------------------------------------GSPS_INPUT VS( VS_INPUT input ){    GSPS_INPUT output = (VS_INPUT)0;    return output;}//------------------------------------------------------------------------------// Geometry Shader//------------------------------------------------------------------------------[maxvertexcount(128)]void GS(triangle GSPS_INPUT input[1], inout TriangleStream<VS_INPUT> TriStream){    for( int i=0; i<1; i++ )    {   output.Pos   = input[1].Pos;   output.Color = input[1].Color;   TriStream.Append( output ); output.Pos   = input[1].Pos * 0.5;   output.Color = input[1].Color;   TriStream.Append( output ); output.Pos   = input[1].Pos + float4(1.0f, 0.0f, 0.0f, 0.0f);   output.Color = input[1].Color;   TriStream.Append( output ); TriStream.RestartStrip();   }    }//------------------------------------------------------------------------------// Pixel Shader//------------------------------------------------------------------------------float4 PS( GSPS_INPUT input ) : SV_Target{    return input.Color;}//------------------------------------------------------------------------------// Rendering Technique//------------------------------------------------------------------------------technique10 Render{    pass P0    {   //ShadeMode = 1;   SetVertexShader( CompileShader( vs_4_0, VS() ) );   SetGeometryShader   ( CompileShader( gs_4_0, GS() )  );   SetPixelShader ( CompileShader( ps_4_0, GS() ) ); SetBlendState  ( NoBlending, float4( 0.0f, 0.0f, 0.0f, 0.0f ), 0xFFFFFFFF );   SetDepthStencilState( DisableDepth, 0 );    }}   
  Your shaders look fine for me. What is the exact problem you see?   ;  I have never done or even looked at using DX10 yet but 2 things jumped out at me...1.What exactly does this do?  As far as i can tell it does nothing...intentional?GSPS_INPUT VS( VS_INPUT input ){GSPS_INPUT output = (VS_INPUT)0;return output;}2.Surely the last one here should be pointing at PS() instead of GS()?SetVertexShader ( CompileShader( vs_4_0, VS() ) );SetGeometryShader ( CompileShader( gs_4_0, GS() ) );SetPixelShader ( CompileShader( ps_4_0, GS() ) );Like i said i've never done DX10 before so I might be making a complete fool of myself here..... :P   ;  Hello!I've done this some months ago when i generated billboarded particles from one vertex. Important thing is to inform DX that points should be used. This is done before render call:m_pd3dDevice->IASetPrimitiveTopology( D3D10_PRIMITIVE_TOPOLOGY_POINTLIST );And my shader looks like this:[maxvertexcount(4)]void GSScene( point GSSceneIn input[1], inout TriangleStream<PSSceneIn> OutputStream ){.......}Hope this could help a bit :)   