top of page
shader Cross(
float s = 0
[[
int lockgeom = 0,
string widget = "null",
]],
float t = 0
[[
int lockgeom = 0,
string widget = "null",
]],
float s_offset = 0.5,
float s_width = 0.3,
float t_offset = 0.5,
float t_width = 0.3,
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 left = s_offset - s_width/2;
float right = s_offset + s_width/2;
float top = t_offset - t_width/2;
float bottom = t_offset + t_width/2;
if(ss >= left && ss <= right || tt >= top && tt <= bottom)
resultRGB = A_color;
else
resultRGB = B_color;
}
bottom of page