mirror of
https://github.com/bvanroll/shaders.git
synced 2025-08-29 12:02:44 +00:00
hello_world
This commit is contained in:
17
learning/hello_world/main.frag
Normal file
17
learning/hello_world/main.frag
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifdef GL_ES
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform float u_time;
|
||||
|
||||
vec4 col() {
|
||||
float r = abs(sin(u_time));
|
||||
float g = abs(cos(u_time/2.0));
|
||||
float b = abs(tan(u_time/3.0));
|
||||
return vec4(r, g, b, 1.0);
|
||||
}
|
||||
|
||||
void main() {
|
||||
gl_FragColor = vec4(col());
|
||||
}
|
||||
|
Reference in New Issue
Block a user