Dual Core
GLSL shader by f18199 · created 2026-03-03 · 10s loop · 1 pass
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.
#define time iTime*2.*pi/10.
#define R iResolution.xy
#define ar R.x/R.y
#define M iMouse
#define xm (M.xy/R)
#define nm ((xm.xy-0.5)*vec2(ar,1.)+0.5)
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 - 0.5 * iResolution.xy) / iResolution.y;
// Two wave sources
float d1 = length(uv - vec2(-0.3, 0.0));
float d2 = length(uv - vec2(0.3, 0.0));
bool is_source1 = d1 < d2;
float wave, glow;
vec3 col;
if(is_source1) {
wave = sin(d1 * 12.0 - iTime * 2.0);
col = 0.5 + 0.5 * cos(vec3(0.0, 2.0, 4.0) + wave);
glow = exp(-d1 * 2.5);
} else {
wave = sin(d2 * 12.0 + iTime * 2.0);
col = 0.5 + 0.5 * cos(vec3(3.0, 4.0, 5.0) + wave);
glow = exp(-d2 * 2.5);
}
col *= glow * 1.5;
// Vignette
float vig = 1.0 - length(uv) * 0.4;
col *= vig;
fragColor = vec4(col, 1.0);
}
Browse all public shaders · All shaders by f18199 · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.