top of page

shader
Circle_1(
    float s = 0 
        [[
        int lockgeom = 0,
        string widget = "null",
        ]],
    float t = 0
        [[
        int lockgeom = 0,
        string widget = "null",
        ]],
        
    float s_center = 0.5,
    float t_center = 0.5,
    //float radius = 0.4,
    float outer_radius = 0.4,

    output color resultRGB = 0)
{
// Ensure we are using the values of 's' and 't' if they
// are recieving values from a PxrManifold2d node.
float ss = fmod(s,1);
float tt = fmod(t,1);

float dist = distance(point(s_center,t_center,0),
                        point(ss,tt,0));
if (dist <= outer_radius)
    resultRGB = color(1,0,0);
else
    resultRGB = 1;
}

bottom of page