
pedro
pedro
About
- Username
- pedro
- Joined
- Visits
- 1,736
- Last Active
- Roles
- Member
Activity
-
I guess this is a place to leave comments on your profile. I mistook it for the PM box lol
November 1 -
-
// I think this was everything. Man I thought copying text from web sites was difficult. VS does not make it easy! This is just the default preset //(wobbly ring)
/*
{
"author": "",
"color": "grey",
"movement": true,
"parameters": [
{
"default": 0.5,
"name": "x"
},
{
"default": 0.5,
"name": "y"
},
{
"default": 0.85,
"name": "radius"
},
{
"default": 0.1,
"name": "noise"
},
{
"default": 0.022,
"name": "glow"
}
],
"url": "http://glslsandbox.com/e#73069.3",
"uuid": "5aa20b71-4b86-4130-a21e-b73a21804cce"
}
*/
#ifdef GL_ES
precision highp float;
#endif
float xx = x;
float yy = y;
float WAVE_SPEED = 2.;
vec2 random22(vec2 c_)
{
float x = fract(sin(dot(c_, vec2(75.8,48.6)))*1e5);
float y = fract(sin(dot(c_, vec2(85.8,108.6)))*1e5);
return vec2(x,y)*2.-1.;
}
float generateNoise(vec2 coord)
{
vec2 i = floor(coord);
vec2 f = fract(coord);
f = f*f*f*(f*(f*6.-15.)+10.);
return mix(mix( dot(random22(i), coord-i), dot(random22(i+vec2(1., 0.)), coord-(i+vec2(1., 0.))),f.x),mix( dot(random22(i+vec2(0., 1.)), coord-(i+vec2(0., 1.))),dot(random22(i+vec2(1., 1.)), coord-(i+vec2(1., 1.))),f.x),f.y);
}
vec2 noiseVec2(vec2 coord)
{
coord += time*WAVE_SPEED;
return vec2(generateNoise((coord+vec2(10.550,71.510))), generateNoise((coord+vec2(-710.410,150.650))));
}
float ring(vec2 p, float size)
{
float r = 1./(5.*abs(size*length(p)-0.632));
return r*0.648;
}
void main()
{
float div = resolution.y/resolution.x;
vec2 aspect = vec2(1.,div);
vec2 uv = texCoord*aspect-vec2(xx, yy*div);
uv *= 8.;
uv += noiseVec2(uv*-0.520)*noise*10.;
float size = 5.*(1.-radius);
float depth = sin(size*.06)*1.5+1.5;
float r = ring(uv, size)*depth*50.*glow;
vec3 col = mix(vec3(0.01), vec3(0.049,0.114,0.265), r)*color.rgb*opacity;
gl_FragColor = vec4(col, alpha);
}
October 31