Project_2026-06-25_12-22-43
GLSL shader by scry · created 2026-06-25 · 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)
// Fork of "Visual Enhancer" by scry. https://shadertoy.com/view/tlfyDf
// 2022-04-03 06:54:20
float random (in vec2 st) {
return fract(sin(dot(st.xy,
vec2(12.9898,78.233)))
* 43758.5453123);
}
float sdCross(in vec2 p, in vec2 b, float r) {
p = abs(p); p = (p.y>p.x) ? p.yx : p.xy;
vec2 q = p - b;
float k = max(q.y,q.x);
vec2 w = (k>0.0) ? q : vec2(b.y-p.x,-k);
return sign(k)*length(max(w,0.0)) + r;
}
float noise (in vec2 st) {
vec2 i = floor(st);
vec2 f = fract(st);
// Four corners in 2D of a tile
float a = random(i);
float b = random(i + vec2(1.0, 0.0));
float c = random(i + vec2(0.0, 1.0));
float d = random(i + vec2(1.0, 1.0));
// Smooth Interpolation
// Cubic Hermine Curve. Same as SmoothStep()
vec2 u = f*f*(3.0-2.0*f);
// u = smoothstep(0.,1.,f);
// Mix 4 coorners percentages
return mix(a, b, u.x) +
(c - a)* u.y * (1.0 - u.x) +
(d - b) * u.x * u.y;
}
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord/iResolution.xy;
uv -= 0.5;
uv.x *= ar;
uv += 0.5;
vec2 cv = uv;
uv *= R.y/540.;
float c = length(uv-0.5);
float tt = iTime;
float n1 = mod(noise(uv*950.)*100.,1.)*100.;
float n2 = noise(uv+n1+tt*0.1);
vec3 col = vec3(1.-(n2*1.));
col *= 0.99;
col += 0.0;
vec3 c2 = 1.-col;
float fn = noise(uv);
//tt = uv.x*8.+tt*9.;
float f =(sin((tt*3.14)*9.+sin(tt*.4)*44.)+1.)*0.1;
f = sin(tt*pi*(40.+sin(tt*pi/100.)*10.));
float s =(sin(tt*0.04)+1.);
f = f+0.95;
s += 1.;
col = fract(col*1.02);
col *= 0.35;
col += f*0.04; //fast flicker for dreamachine effect
//https://en.wikipedia.org/wiki/Dreamachine
col *= s*0.5;
col *= 0.95 +sin(c*10.+tt)*0.02;
col += (sin(uv.y*6.+tt*0.033)*0.5+0.5)*.04;
float ds = 100.;
vec2 ov = uv;
//uv.x += uv.y*2.;
uv.x += uv.y*0.5;
uv = (fract(uv*ds)-0.5)/ds;
uv.x -= uv.y*0.5;
col += step(length(uv),0.003)*0.1;
uv = ov;
ds = 10.;
uv.x += uv.y*0.5;
uv = (fract(uv*30.)-0.5)/ds;
uv.x -= uv.y*0.5;
col += step(length(uv),0.006)*0.12;
uv = ov;
ds = 14.;
//uv.x += uv.y*0.5;
uv = (fract(uv*ds*4.5)-0.5)/ds;
//uv.x -= uv.y*0.5;
col += step(length(uv),0.02)*0.02;
//col = mix(col,c2,f);
// Crosshair
float crosshair = sdCross(cv - 0.5, vec2(0.01, 0.001), 0.0);
col += smoothstep(0.002, 0.0, crosshair) * 0.35;
//col = mod(col,1.);
//gl_FragColor = vec4(col,1.);
// Normalized pixel coordinates (from 0 to 1)
// Time varying pixel color
//vec3 col = 0.5 + 0.5*cos(iTime+uv.xyx+vec3(0,2,4));
// Output to screen
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
- Visual Enhancer
- Project_2026-06-24_11-11-39
- Project_2026-06-23_19-17-29
Browse all public shaders · All shaders by scry · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.