runnable fragment

Colour Distance.fs

vidvox-isf-files sdf glsl runnable fragment MIT
code snippet
uniform sampler2D startImage;
uniform sampler2D endImage;
uniform float progress;
uniform float power;
precision mediump float;
/*{
    "CATEGORIES": [
        "Dissolve",
        "Wipe"
    ],
    "CREDIT": "Automatically converted from https://www.github.com/gl-transitions/gl-transitions/tree/master/ColourDistance.glsl",
    "DESCRIPTION": "",
    "INPUTS": [
        {
runnable fragment

Raymarched Orb Field

stronghold-curated sdf glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float map(vec3 p){float d=length(p)-0.45; for(int i=0;i<4;i++){float fi=float(i); vec3 c=vec3(sin(time*.4+fi)*1.1,cos(time*.3+fi*1.7)*.55,fi*.55-1.0); d=min(d,length(p-c)-.22);} return d;}
vec3 normal(vec3 p){vec2 e=vec2(.01,0);return normalize(vec3(map(p+e.xyy)-map(p-e.xyy),map(p+e.yxy)-map(p-e.yxy),map(p+e.yyx)-map(p-e.yyx)));}
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y); vec3 ro=vec3(0,0,3.0), rd=normalize(vec3(uv,-1.8)); float t=0.0, glow=0.0;
 for(int i=0;i<48;i++){vec3 p=ro+rd*t; float d=map(p); glow+=0.015/(0.02+abs(d)); if(d<.005||t>6.0)break; t+=d*.65;}
 vec3 col=vec3(0.01,0.015,0.04)+glow*vec3(0.12,0.35,0.9); if(t<6.0){vec3 n=normal(ro+rd*t); col+=max(dot(n,normalize(vec3(.4,.7,.5))),0.0)*vec3(.8,.9,1.0);} gl_FragColor=vec4(col,1.0);
}
runnable fragment

SDF Soft Blobs

stronghold-curated sdf glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float circle(vec2 p, vec2 c, float r){ return length(p-c)-r; }
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
 float d=10.0;
 for(int i=0;i<6;i++){
   float fi=float(i);
   vec2 c=0.48*vec2(sin(time*(0.4+fi*0.07)+fi*1.7), cos(time*(0.35+fi*0.05)+fi*2.1));
   d=min(d, circle(uv,c,0.22+0.04*sin(time+fi)));
 }
 float fill=smoothstep(0.035,-0.025,d);
 float glow=0.018/max(0.018,abs(d));