Project_2026-01-14_21-05-29
GLSL shader by scry · created 2026-01-15 · 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;
vec2 tv = uv;
// Subtle geometric distortion for feedback
vec2 center = tv - 0.5;
float dist = length(center);
vec2 distortedUV = tv + center * sin(dist * 10.0 - time) * 0.002;
vec3 feedback = texture(iChannel0, distortedUV).rgb * 0.92;
uv -= 0.5;
uv.x *= ar;
vec3 col = vec3(0.);
vec2 p = uv;
// Fractal iteration with rotation and absolute value
for(int i = 0; i < 5; i++) {
// Apply absolute value for folding symmetry
p = abs(p);
// Rotate
float angle = time * 0.2 + float(i) * 0.5;
p *= r2d(angle);
// Scale and translate
p = p * 1.3 - 0.5;
}
// Grid of circles with fractal-distorted space
vec2 gv = fract(p * 5.0) - 0.5;
vec2 id = floor(p * 5.0);
// Spatial distortion using dot product
float distortion = dot(id, id) * 0.1;
float offset = sin(time + distortion) * 0.3;
// Circles
float dCircle = length(gv) - 0.2 + offset;
// Triangles - equilateral triangle SDF
const float k = sqrt(3.0);
vec2 gvTri = gv;
gvTri.x = abs(gvTri.x) - 0.3;
gvTri.y = gvTri.y + 0.3/k;
if(gvTri.x + k*gvTri.y > 0.0) gvTri = vec2(gvTri.x - k*gvTri.y, -k*gvTri.x - gvTri.y)/2.0;
gvTri.x -= clamp(gvTri.x, -0.6, 0.0);
float dTriangle = -length(gvTri) * sign(gvTri.y) + offset * 0.5;
float d = min(dCircle, dTriangle);
// Rainbow coloring using angle
float angle = atan(gv.y, gv.x);
vec3 rainbow = vec3(
0.5 + 0.5 * sin(angle * 3.0 + time),
0.5 + 0.5 * sin(angle * 3.0 + time + 2.0),
0.5 + 0.5 * sin(angle * 3.0 + time + 4.0)
);
col += smoothstep(0.02, 0.0, d) * rainbow;
col = mix(feedback, col, 0.3);
fragColor = vec4(col, 1.0);
}
Image
Not used
More shaders by scry
- Spiral Nebula Nocturne
- Iridescent Ground Ritual
- 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
Browse all public shaders · All shaders by scry · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.