I'm currently having a pixel shader:
float4 PixelShaderFunction(float2 coords: TEXCOORD0) : COLOR0
{
float4 color = tex2D(Sampler0,coords);
float dx = coords.x - 0.5f;
float dy = coords.y - 0.5f;
float tpos = dx * dx + dy * dy;
if(tpos <= 0.25f && tpos > 0.25f-width )
return color;
else
return float4(0.0f, 0.0f, 0.0f, 0.0f);
}
This way I am able to draw a circle. But how do I cut the circle, e.g. draw 30 degrees circle? Or 60 degrees one? Thanks.