(source, mask, destination)
| 1394 | } |
| 1395 | |
| 1396 | function applySunrays (source, mask, destination) { |
| 1397 | gl.disable(gl.BLEND); |
| 1398 | sunraysMaskProgram.bind(); |
| 1399 | gl.uniform1i(sunraysMaskProgram.uniforms.uTexture, source.attach(0)); |
| 1400 | blit(mask); |
| 1401 | |
| 1402 | sunraysProgram.bind(); |
| 1403 | gl.uniform1f(sunraysProgram.uniforms.weight, config.SUNRAYS_WEIGHT); |
| 1404 | gl.uniform1i(sunraysProgram.uniforms.uTexture, mask.attach(0)); |
| 1405 | blit(destination); |
| 1406 | } |
| 1407 | |
| 1408 | function blur (target, temp, iterations) { |
| 1409 | blurProgram.bind(); |