Yeah, obviously wrong. Very wrong. I gonna put the geo-shader code here for easier comparison.
int n = 20;
float r1 = 0.1;
float r2 = 0.05;
for(int i = 0; i <= n; i++)
{
float a = (float)i / n * 2 * 3.1415926;
float x, y;
sincos(a, x, y);
v.Position = mul(center + r2 * float4(x,y,0,0), WVP);
triStream.Append(v);
v.Position = mul(center + r1 * float4(x,y,0,0), WVP);
triStream.Append(v);
}
And some probing questions:
- Why do you iterate to 363 degrees ?
- Why do you add three vertices per iteration?
- Why adding a "thickness" once to x and once to y?
Please
explain your thinking here, because your result looks very hackish. It might also help to use a bigger step (60 or even 90 degrees) and render in wire-frame (or use a graphics debugger) to get a better look at your result.