Back to shaders

Shader test bench

Plasma Bloom Field

stronghold-curated plasma glsl runnable fragment MIT
Source
runnable fragment

Complete GLSL fragment shader. Stronghold runs it directly when the browser can compile it.

Code

precision mediump float;
uniform vec2 resolution;
uniform float time;
void main() {
  vec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);
  float v = 0.0;
  v += sin(uv.x * 4.0 + time * 1.2);
  v += sin((uv.y * 5.0 + time * 0.9));
  v += sin((uv.x + uv.y) * 3.0 + time * 1.7);
  v += sin(length(uv + vec2(sin(time * 0.4), cos(time * 0.3))) * 8.0 - time * 2.0);
  v = v * 0.25 + 0.5;
  vec3 color = 0.5 + 0.5 * cos(6.28318 * (vec3(0.00, 0.22, 0.45) + v + time * 0.035));
  gl_FragColor = vec4(color, 1.0);
}