add trivial.glsl
This commit is contained in:
parent
5c80245b53
commit
0e881ee340
1 changed files with 18 additions and 0 deletions
18
www/shaders/trivial.glsl
Normal file
18
www/shaders/trivial.glsl
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
// is highp wasteful for this shader?
|
||||
#ifdef GL_FRAGMENT_PRECISION_HIGH
|
||||
precision highp float;
|
||||
#else
|
||||
precision mediump float;
|
||||
#endif
|
||||
|
||||
uniform float u_time;
|
||||
uniform vec2 u_resolution;
|
||||
|
||||
void main() {
|
||||
vec2 uv = gl_FragCoord.xy / u_resolution;
|
||||
|
||||
vec3 col = 0.5 + 0.5 * cos(u_time + uv.xyx + vec3(0, 2, 4));
|
||||
|
||||
gl_FragColor = vec4(col,1.0);
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue