Epic Color Transition Fragment Shader
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Has been cancelled

This commit is contained in:
2025-04-14 21:36:08 -04:00
parent 5068b4660e
commit 73de143ec5

View File

@@ -7,9 +7,17 @@ precision mediump float;
uniform vec2 u_resolution;
uniform float u_time;
void main() {
vec2 st = gl_FragCoord.xy/u_resolution;
gl_FragColor = vec4(st.x,st.y,0.0,1.0);
vec3 colorA = vec3(0.149,0.141,0.912);
vec3 colorB = vec3(1.000,0.833,0.224);
gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);
void main() {
vec3 color = vec3(0.0);
float pct = abs(sin(u_time));
// Mix uses pct (a value from 0-1) to
// mix the two colors
color = mix(colorA, colorB, pct);
gl_FragColor = vec4(color,1.0);
}