precision mediump float;
varying vec2 position;
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = cos(p.x);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
void main() {
vec2 p = (position - 0.5) * 50.;
float angle = 0.3;
vec2 direction = vec2(cos(angle), sin(angle));
float brightness = cos(dot(p, direction));
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
void main() {
vec2 p = (position - 0.5) * 50.;
float angle = time;
vec2 direction = vec2(cos(angle), sin(angle));
float brightness = cos(dot(p, direction));
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = wave(p, time);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = 0.;
brightness += wave(p, 0.);
brightness += wave(p, 0.3);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = 0.;
brightness += wave(p, 0.);
brightness += wave(p, time);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
float wrap(float x) {
return abs(mod(x, 2.)-1.);
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = 0.;
brightness += wave(p, 0.);
brightness += wave(p, time);
brightness = wrap(brightness);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
float wrap(float x) {
return abs(mod(x, 2.)-1.);
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = 0.;
for (float i = 1.; i <= 3.; i++) {
brightness += wave(p, i);
}
brightness = wrap(brightness);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
float wrap(float x) {
return abs(mod(x, 2.)-1.);
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = 0.;
for (float i = 1.; i <= 4.; i++) {
brightness += wave(p, time / i);
}
brightness = wrap(brightness);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}
precision mediump float;
varying vec2 position;
uniform float time;
float wave(vec2 p, float angle) {
vec2 direction = vec2(cos(angle), sin(angle));
return cos(dot(p, direction));
}
float wrap(float x) {
return abs(mod(x, 2.)-1.);
}
void main() {
vec2 p = (position - 0.5) * 50.;
float brightness = 0.;
for (float i = 1.; i <= 11.; i++) {
brightness += wave(p, time / i);
}
brightness = wrap(brightness);
gl_FragColor.rgb = vec3(brightness);
gl_FragColor.a = 1.;
}