Project_2026-01-25_13-28-13
GLSL shader by scry · created 2026-01-25 · updated 2026-01-26 · 10s loop · 2 passes
This page opens the shader in the ShaderKit browser GLSL editor: edit it live, fork it, or render it to video, GIF or images up to 8K. Also available as a full-screen view and an embeddable player.
Shader source (GLSL)
Common
#define pi acos(-1.)
#define deg pi/180. //1 degree
#define time iTime*2.*pi/10. //sin(time) loops 10 seconds
#define R iResolution.xy //shorthand
#define ar R.x/R.y //aspect ratio
#define M iMouse //shorthand
#define xm (M.xy/R) //normalized mouse
#define nm ((xm.xy-0.5)*vec2(ar,1.)+0.5) //aspect ratio correction
vec3 cs = vec3(1.,2.,3.);
mat2 r2d(float a) {
return mat2(cos(a),sin(a),-sin(a),cos(a));
}
Buffer A (iChannel0)
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = fragCoord.xy / iResolution.xy;
uv -= 0.5;
uv.x *= ar;
float radius = 0.15;
float thickness = 0.02;
// Three circles offset at 120 degrees
float angle1 = 0.0;
float angle2 = 2.0 * pi / 3.0;
float angle3 = 4.0 * pi / 3.0;
vec2 o1 = radius * vec2(cos(angle1), sin(angle1));
vec2 o2 = radius * vec2(cos(angle2), sin(angle2));
vec2 o3 = radius * vec2(cos(angle3), sin(angle3));
radius += 0.075;
float d1 = length(uv - o1);
float d2 = length(uv - o2);
float d3 = length(uv - o3);
float c1 = smoothstep(thickness, 0.0, abs(d1 - radius));
float c2 = smoothstep(thickness, 0.0, abs(d2 - radius));
float c3 = smoothstep(thickness, 0.0, abs(d3 - radius));
//angle1 += deg*60.;
angle1 += deg*95.;
angle2 += deg*95.;
angle3 += deg*95.;
//change angle1,2,3 here to put the dots on the intersections of the circles
thickness /= 2.;
c1 -= smoothstep(0.02,0.,length(uv - (o1 + radius * vec2(cos(angle1), sin(angle1)))) - thickness);
c2 -= smoothstep(0.02,0.,length(uv - (o2 + radius * vec2(cos(angle2), sin(angle2)))) - thickness);
c3 -= smoothstep(0.02,0.,length(uv - (o3 + radius * vec2(cos(angle3), sin(angle3)))) - thickness);
angle1 += deg*110.;
angle2 += deg*110.;
angle3 += deg*110.;
c1 -= smoothstep(0.02,0.,length(uv - (o1 + radius * vec2(cos(angle1), sin(angle1)))) - thickness);
c2 -= smoothstep(0.02,0.,length(uv - (o2 + radius * vec2(cos(angle2), sin(angle2)))) - thickness);
c3 -= smoothstep(0.02,0.,length(uv - (o3 + radius * vec2(cos(angle3), sin(angle3)))) - thickness);
c1 = clamp(c1,0.,1.);
c2 = clamp(c2,0.,1.);
c3 = clamp(c3,0.,1.);
vec3 hue1 = 0.5 + 0.5 * cos(6.28318 * (atan(uv.y - o1.y, uv.x - o1.x) / 6.28318 + time + vec3(0.0, 0.33, 0.67)));
vec3 hue2 = 0.5 + 0.5 * cos(6.28318 * (atan(uv.y - o2.y, uv.x - o2.x) / 6.28318 + time + vec3(0.0, 0.33, 0.67)));
vec3 hue3 = 0.5 + 0.5 * cos(6.28318 * (atan(uv.y - o3.y, uv.x - o3.x) / 6.28318 + time + vec3(0.0, 0.33, 0.67)));
vec3 col = c1 * hue1 + c2 * hue2 + c3 * hue3;
col = max(col, vec3(0.0));
fragColor = vec4(col, 1.0);
}
Image
Not used
More shaders by scry
- Project_2026-08-15_18-22-06
- Project_2026-08-14_16-45-00
- Project_2026-07-24_15-10-23
- Project_2026-07-15_03-18-26
- Glass of Orange Juice (raymarched)
- Project_2026-07-13_00-53-50
- Project_2026-07-10_16-39-54
- Popcorn ceiling
- Project_2026-06-20_15-32-19
- Project_2026-06-25_12-22-43
- Visual Enhancer
- Project_2026-06-24_11-11-39
Browse all public shaders · All shaders by scry · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.