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
17
shaders/ocean.glsl
Normal file
17
shaders/ocean.glsl
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Slow waves with white foam on the crests
|
||||
|
||||
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
||||
float i = floor(fragCoord.x / iResolution.x * 16.0);
|
||||
|
||||
float w = 0.5 + 0.5 * sin(i * 0.55 - iTime * 0.5);
|
||||
float w2 = 0.5 + 0.5 * sin(i * 0.9 + iTime * 0.35 + 1.0);
|
||||
float h = 0.6 * w + 0.4 * w2;
|
||||
|
||||
vec3 deep = vec3(0.0, 0.05, 0.28);
|
||||
vec3 shallow = vec3(0.0, 0.55, 0.75);
|
||||
vec3 col = mix(deep, shallow, h);
|
||||
|
||||
float foam = smoothstep(0.82, 0.97, h);
|
||||
col = mix(col, vec3(0.9), foam * 0.8);
|
||||
fragColor = vec4(col, 1.0);
|
||||
}
|
||||
Loading…
Reference in a new issue