In HLSL, all channel values are manipulated as float4
s, meaning each channel is a float. Maximum value is not 255, but rather 1.0f.
The center of the texture will always be float2 center = float2(0.5f, 0.5f);
as again all positions are based not on pixel nor texel, but normalized float position (with 0,0 being top-left and 1,1 being bottom right). Your pixel shader has no concept of the pixel dimentions of your texture unless you specifically set them in a SetParameter
call to the effect, before you apply it.
From that information, it should be just a trivial matter of setting your desired theta (angle) and doing some simple trig in the shader to get distance from center, etc..
Hope that helps!