Add fire, ocean, heartbeat, bounce, trans and storm shaders
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
eb154cdf53
commit
cebb41dbc7
1 changed files with 138 additions and 0 deletions
19
shaders/heartbeat.glsl
Normal file
19
shaders/heartbeat.glsl
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
// A slow lub-dub travelling up the stairs
|
||||
|
||||
float bump(float x, float c, float w) {
|
||||
float d = (x - c) / w;
|
||||
return exp(-d * d);
|
||||
}
|
||||
|
||||
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
||||
float i = floor(fragCoord.x / iResolution.x * 16.0);
|
||||
|
||||
float period = 3.2; // slow, ~19 bpm
|
||||
float ph = fract((iTime - i * 0.15) / period) * period;
|
||||
float beat = bump(ph, 0.50, 0.20) + 0.65 * bump(ph, 1.25, 0.26);
|
||||
|
||||
vec3 base = vec3(0.10, 0.0, 0.01);
|
||||
vec3 col = base + vec3(1.0, 0.04, 0.06) * beat;
|
||||
col += vec3(0.5) * bump(ph, 0.50, 0.08); // white-ish peak
|
||||
fragColor = vec4(col, 1.0);
|
||||
}
|
||||
Loading…
Reference in a new issue