initial: added basic stuff

This commit is contained in:
2017-06-05 15:03:57 -04:00
commit 4eb5b153b9
6 changed files with 98 additions and 0 deletions

21
basic/sunset.glsl Normal file
View File

@@ -0,0 +1,21 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform float u_time;
void main() {
vec2 st = gl_FragCoord.xy/u_resolution.xy;
vec3 sun = vec3(1.0*abs(sin(u_time)), .0, 0.4*abs(cos(u_time)));
vec3 pct = vec3(st.x);
vec3 color = sun;
color *= vec3(step(0.4, st.y));
if (step(0.4, st.y)<1.0) {
color = sun * vec3(smoothstep(0.2, 0.4, st.y));
color += vec3(0.3,0.2,0.9);
}
gl_FragColor = vec4(color,1.0);
}