Spaces:
Running
Running
| precision highp float; | |
| varying vec2 vUv; | |
| uniform sampler2D uVelocity; | |
| uniform sampler2D uSource; | |
| uniform vec2 texelSize; | |
| uniform float dt; | |
| uniform float uDissipation; | |
| void main() { | |
| vec2 coord = vUv - dt * texture2D(uVelocity, vUv).xy * texelSize; | |
| gl_FragColor = uDissipation * texture2D(uSource, coord); | |
| gl_FragColor.a = 1.0; | |
| } |