uniform float time; uniform vec2 resolution; varying vec2 vUv; void main( void ) { vec2 position = -1.0 + 2.0 * vUv; float red = abs( sin( position.x * position.y + time / 5.0 ) ); float green = abs( sin( position.x * position.y + time / 4.0 ) ); float blue = abs( sin( position.x * position.y + time / 3.0 ) ); gl_FragColor = vec4( red, green, blue, 1.0 ); }
varying vec2 vUv; void main() { vUv = uv; vec4 mvPosition = modelViewMatrix * vec4( position, 1.0 ); gl_Position = projectionMatrix * mvPosition; }
uniform float time; uniform vec2 resolution; uniform sampler2D texture; varying vec2 vUv; void main( void ) { vec2 position = vUv; float color = 0.0; color += sin( position.x * cos( time / 15.0 ) * 80.0 ) + cos( position.y * cos( time / 15.0 ) * 50.0 ); color += sin( position.y * sin( time / 10.0 ) * 40.0 ) + cos( position.x * sin( time / 25.0 ) * 400.0 ); color += sin( position.x * sin( time / 5.0 ) * 10.0 ) + sin( position.y * sin( time / 35.0 ) * 80.0 ); color *= sin( time / 10.0 ) * 0.5; gl_FragColor = vec4( vec3( cos(color + time *0.3), color * 0.5, sin( color + time / 1.0 ) * 0.75 ), 1.0 ); }
Loading...