site/www/shaders/trivial.glsl

19 lines
338 B
Text
Raw Normal View History

2026-01-31 12:33:57 +10:00
// is highp wasteful for this shader?
#ifdef GL_FRAGMENT_PRECISION_HIGH
2026-02-02 05:02:23 +10:00
precision highp float;
2026-01-31 12:33:57 +10:00
#else
2026-02-02 05:02:23 +10:00
precision mediump float;
2026-01-31 12:33:57 +10:00
#endif
2026-02-02 05:02:23 +10:00
uniform float uTime;
uniform vec2 uResolution;
2026-01-31 12:33:57 +10:00
void main() {
2026-02-02 05:02:23 +10:00
vec2 uv = gl_FragCoord.xy / uResolution;
2026-01-31 12:33:57 +10:00
2026-02-02 05:02:23 +10:00
vec3 col = 0.5 + 0.5 * cos(uTime + uv.xyx + vec3(0, 2, 4));
2026-01-31 12:33:57 +10:00
gl_FragColor = vec4(col,1.0);
}