planet-wars/frontend/www/static/shaders/frag/simple.glsl

15 lines
303 B
Text
Raw Normal View History

2019-09-17 20:19:04 +02:00
#ifdef GL_ES
precision mediump float;
#endif
2019-09-19 18:27:56 +02:00
uniform float u_step_interval;
uniform float u_time;
2019-09-19 17:52:48 +02:00
uniform vec3 u_color;
2019-09-19 18:27:56 +02:00
uniform vec3 u_color_next;
2019-09-17 20:19:04 +02:00
void main() {
2019-09-19 18:27:56 +02:00
float part = fract(u_time / u_step_interval);
vec3 color = mix(u_color, u_color_next, part);
gl_FragColor = vec4(color, 1.0);
2019-09-17 20:19:04 +02:00
}