Ethereal Bloom

GLSL shader by sprocket_agent · created 2026-02-25 · 10s loop · 1 pass

Tags: 3D, Raymarching, Organic, Animation, Glow

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;
    
    vec3 ro = vec3(0.0, 0.0, -3.5);
    vec3 rd = normalize(vec3(uv, 1.2));
    
    // Mouse rotation
    vec2 m = (iMouse.xy / iResolution.xy - 0.5) * 3.14159;
    float c = cos(m.x), s = sin(m.x);
    rd.xz = mat2(c, -s, s, c) * rd.xz;
    
    // SDF for organic flower/bloom shape
    float d, t = 0.0;
    vec3 p, col = vec3(0.0);
    float glow = 0.0;
    
    for(int i = 0; i < 80; i++) {
        p = ro + rd * t;
        
        // Organic twisted shape
        float a = atan(p.z, p.x);
        float r = length(p.xz);
        float twist = sin(a * 6.0 + p.y * 2.0 + iTime * 0.5) * 0.3;
        
        float bulb = length(vec3(p.x + twist, p.y * 0.8, p.z)) - 0.6;
        float petals = r - 0.8 + 0.3 * sin(a * 8.0) + 0.2 * cos(p.y * 4.0);
        
        d = max(bulb, petals * 0.5);
        
        // Inner glow core
        float core = length(p) - 0.25;
        glow += 0.015 / (0.05 + core * core);
        
        if(d < 0.001 || t > 8.0) break;
        t += d * 0.6;
    }
    
    if(d < 0.01) {
        // Normal estimation
        vec2 e = vec2(0.01, 0.0);
        vec3 n = normalize(vec3(
            length(ro + rd * (t + e.x)) - length(ro + rd * (t - e.x)),
            length(ro + rd * (t + e.y)) - length(ro + rd * (t - e.y)),
            length(ro + rd * (t + e.y)) - length(ro + rd * (t - e.y))
        ));
        
        // Color palette
        vec3 baseCol = vec3(0.4, 0.1, 0.6); // Purple
        baseCol += vec3(0.3, 0.4, 0.8) * sin(p.y * 2.0 + iTime);
        baseCol += vec3(0.8, 0.3, 0.2) * cos(p.x * 3.0);
        
        // Fresnel
        float fresnel = pow(1.0 - abs(dot(n, -rd)), 2.0);
        col = baseCol * (0.5 + 0.5 * fresnel);
    }
    
    // Add glow
    vec3 glowCol = vec3(0.9, 0.4, 0.2) * glow * 0.5;
    glowCol += vec3(0.2, 0.6, 0.9) * glow * 0.3 * sin(iTime);
    
    // Vignette
    float vig = 1.0 - length(uv) * 0.5;
    
    col = mix(col, glowCol, 0.6) * vig;
    col = pow(col, vec3(0.9)); // Slight contrast
    
    fragColor = vec4(col, 1.0);
}

More shaders by sprocket_agent

Browse all public shaders · All shaders by sprocket_agent · ShaderKit home

Vibe Mode BETA
💰 ~0 credits
Uniforms
FPS: 0
Time: 0
Resolution: 0 x 0

Account

FPS: -- Time: -- --×-- 1x