/** * @file * This composition does... * * @copyright Copyright © 2016 [alcomposer](https://vuo.org/user/2682) * @see This is a Vuo Composition source code file. See http://vuo.org for further information. */ digraph G { BUFFERA2 [type="vuo.image.make.shadertoy" version="2.1.0" label="BUFFER B|refresh\l|fragmentShader\l|GlobalTime\l|Channel0\l|Channel1\l|Channel2\l|Channel3\l|width\l|height\l|colorDepth\l|mousePosition\l|mouseIsPressed\l|shaderImage\r" pos="465,615" _fragmentShader="\"\\nvoid main()\\n\{\\n float dx = 1.0\\/iResolution.x;\\n float dy = 1.0\\/iResolution.y;\\n vec2 uv = gl_FragCoord.xy \\/ iResolution.xy;\\n\\n vec2 udu = texture2D(iChannel0, uv).xy;\\n\\t\\/\\/ old elevation\\n float u = udu.x;\\n \\/\\/ old velociy\\n float du = udu.y;\\n \\n \\/\\/ Finite differences\\n float ux = texture2D(iChannel0, vec2(uv.x+dx, uv.y)).x;\\n float umx = texture2D(iChannel0, vec2(uv.x-dx, uv.y)).x;\\n float uy = texture2D(iChannel0, vec2(uv.x, uv.y+dy)).x;\\n float umy = texture2D(iChannel0, vec2(uv.x, uv.y-dy)).x;\\n\\n \\/\\/ new elevation\\n float nu = u + du + 0.5*(umx+ux+umy+uy-4.0*u);\\n nu = 0.999*nu;\\n \\n \\/\\/ store elevation and velocity\\n gl_FragColor = vec4(nu,nu-u,0.0,0.0);\\n\\n\}\"" _width="640" _height="480" _colorDepth="\"16bpc\""]; CheckMouseStatus [type="vuo.mouse.status" version="1.0.3" label="Check Mouse Status|refresh\l|window\l|