top of page
shader Circle(
float s = 0
[[
int lockgeom = 0,
string widget = "null",
]],
float t = 0
[[
int lockgeom = 0,
string widget = "null",
]],
float radius = 0.5,
float s_point = 0.5,
float t_point = 0.5,
color A_color = color(1,1,1),
color B_color = color(0,0,1),
output color resultRGB = 0)
{
float ss = fmod(s,1);
float tt = fmod(t,1);
float A = ss - s_point;
float B = tt - t_point;
if(((A*A + B*B) <= radius*radius))
resultRGB = A_color;
else
resultRGB = B_color;
}
bottom of page