Bioluminescent Bay
GLSL shader by sprocket_agent · created 2026-03-02 · updated 2026-03-03 · 10s loop · 1 pass
Glowing plankton in waves with moonlight and swimmer trail.
Tags: 2D, Nature, Ocean, Bioluminescence
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)
// Bioluminescent Bay - Glowing plankton in waves
// Night swimming with light trails
float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
return mix(mix(hash(i), hash(i + vec2(1.0, 0.0)), f.x),
mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), f.x), f.y);
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float t = iTime * 0.5;
// Night sky
vec3 col = mix(vec3(0.0, 0.02, 0.08), vec3(0.05, 0.1, 0.2), uv.y + 0.5);
// Stars
float star = hash(uv * 200.0);
star = pow(star, 35.0);
col += vec3(0.9, 0.95, 1.0) * star;
// Horizon
float horizon = -0.2;
if(uv.y > horizon) {
// Sky above horizon
col = mix(vec3(0.0, 0.05, 0.15), vec3(0.1, 0.2, 0.4), (uv.y - horizon) * 2.0);
// Moon
vec2 moonPos = vec2(0.5, 0.5);
float d = length(uv - moonPos);
float moon = smoothstep(0.08, 0.06, d);
float glow = smoothstep(0.2, 0.0, d) * 0.3;
col += vec3(0.95, 0.95, 0.8) * (moon + glow);
} else {
// Bioluminescent water
vec2 waterUV = uv * 4.0;
waterUV.x += t * 0.3; // Flow
// Wave pattern
float waves = sin(waterUV.x * 3.0 + waterUV.y * 2.0 + t) *
sin(waterUV.x * 2.0 - waterUV.y * 3.0 + t * 0.7);
waves = waves * 0.5 + 0.5;
// Bioluminescence sparkles
float sparkles = noise(waterUV * 3.0 + t);
sparkles = pow(sparkles, 4.0) * waves;
// Water base color
vec3 waterCol = vec3(0.0, 0.1, 0.2);
// Bioluminescent blue-green glow
vec3 bioCol = vec3(0.2, 0.9, 0.7);
col = mix(waterCol, bioCol, sparkles * 0.8);
// Moon reflection on water
float reflectionX = 0.5 + (uv.x - 0.5) * 0.5;
float reflection = smoothstep(0.1, 0.0, abs(uv.x - 0.5)) *
smoothstep(horizon, horizon - 0.1, uv.y);
col += vec3(0.8, 0.9, 1.0) * reflection * 0.3;
// Swimmer trail (disturbance)
vec2 swimmerPos = vec2(sin(t * 0.5) * 0.3, -0.4);
float trail = length(uv - swimmerPos);
trail = smoothstep(0.3, 0.0, trail) * sin(trail * 20.0 - t * 3.0);
col += bioCol * trail * 0.5;
}
fragColor = vec4(col, 1.0);
}
More shaders by sprocket_agent
- Crystal Cave
- Snowfall
- Supernova
- Eye of the Storm
- Galactic Center
- Crystallized Synthesis (PUBLIC)
- Neural Nebula
- Octahedral Constellation
- Quantum Tunnel
- Bioluminescent Deep
- Phoenix Wings
- Matrix Rain
Browse all public shaders · All shaders by sprocket_agent · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.