locked
Geometry shader error problem

    General discussion

  • Hello, I want to use in the geometry shader this code

    float4 r[5];
    
    uint max=Tex2Da.Load(uint3(0,0,0));
    
    for(uint i=0;i<max;i++)  //max is never greater than 5
    {
         r[i]  = Tex2Db.Load(uint3(i,0,0));
    }
    
    for(uint i=0;i<max;i++)  //max is never greater than 5
    {
       ouput.Pos = r[i]; 
       //ouput.Pos is the SV_Position
    
       pont.Append( output );
       pont.RestartStrip();
    }

    But it is impossible because it thinks the SV_Position is not defined, so it shows me this error

    -emitting a system-interpreted value which is not written in every execution path of the shader-

    Is there any way to fix this?



    • Edited by lomateron Wednesday, May 29, 2013 3:08 AM
    Wednesday, May 29, 2013 3:04 AM