Skyler Grey | f2c55ae | 2022-11-05 17:48:02 +0000 | [diff] [blame^] | 1 | #extension GL_OES_standard_derivatives : enable |
2 | |||||
3 | precision highp float; | ||||
4 | |||||
5 | uniform float time; | ||||
6 | uniform vec2 resolution; | ||||
7 | |||||
8 | void main( void ) { | ||||
9 | |||||
10 | float t = time / 50.0; | ||||
11 | vec2 position = ( gl_FragCoord.xy / resolution.xy ); | ||||
12 | |||||
13 | vec3 color = vec3(0, 0, 0); | ||||
14 | |||||
15 | color.r += sin(t + position.x + position.y); | ||||
16 | color.g += cos(t + position.x - position.y); | ||||
17 | color.b += sin(-t + position.x); | ||||
18 | |||||
19 | gl_FragColor = vec4( color, 1.0 ); | ||||
20 | |||||
21 | } |