(params, inputTexture, width, height, flipY = 1.0)
| 649 | } |
| 650 | |
| 651 | _renderChromatic(params, inputTexture, width, height, flipY = 1.0) { |
| 652 | const gl = this.gl; |
| 653 | const program = this.programs.chromatic; |
| 654 | |
| 655 | this._useProgram(program, flipY); |
| 656 | |
| 657 | gl.activeTexture(gl.TEXTURE0); |
| 658 | gl.bindTexture(gl.TEXTURE_2D, inputTexture); |
| 659 | |
| 660 | gl.uniform1i(program.uniforms.u_image, 0); |
| 661 | gl.uniform1f(program.uniforms.u_intensity, params.intensity); |
| 662 | gl.uniform1f(program.uniforms.u_angle, params.angle); |
| 663 | gl.uniform1i(program.uniforms.u_radial, params.radial ? 1 : 0); |
| 664 | gl.uniform2f(program.uniforms.u_resolution, width, height); |
| 665 | |
| 666 | gl.drawArrays(gl.TRIANGLES, 0, 6); |
| 667 | } |
| 668 | |
| 669 | _renderVignette(params, inputTexture, width, height, flipY = 1.0) { |
| 670 | const gl = this.gl; |
no test coverage detected