(params, inputTexture, width, height, flipY = 1.0)
| 625 | } |
| 626 | |
| 627 | _renderOverlay(params, inputTexture, width, height, flipY = 1.0) { |
| 628 | const gl = this.gl; |
| 629 | const program = this.programs.overlay; |
| 630 | |
| 631 | this._useProgram(program, flipY); |
| 632 | |
| 633 | gl.activeTexture(gl.TEXTURE0); |
| 634 | gl.bindTexture(gl.TEXTURE_2D, inputTexture); |
| 635 | |
| 636 | gl.activeTexture(gl.TEXTURE1); |
| 637 | gl.bindTexture(gl.TEXTURE_2D, this.textures.overlay || inputTexture); |
| 638 | |
| 639 | gl.uniform1i(program.uniforms.u_image, 0); |
| 640 | gl.uniform1i(program.uniforms.u_overlay, 1); |
| 641 | gl.uniform1f(program.uniforms.u_intensity, params.intensity); |
| 642 | gl.uniform1f(program.uniforms.u_scale, params.scale); |
| 643 | gl.uniform1f(program.uniforms.u_rotation, params.rotation); |
| 644 | gl.uniform1i(program.uniforms.u_blendMode, this._blendModeToInt(params.blendMode)); |
| 645 | gl.uniform2f(program.uniforms.u_resolution, width, height); |
| 646 | gl.uniform1i(program.uniforms.u_hasOverlay, this.textures.overlay ? 1 : 0); |
| 647 | |
| 648 | gl.drawArrays(gl.TRIANGLES, 0, 6); |
| 649 | } |
| 650 | |
| 651 | _renderChromatic(params, inputTexture, width, height, flipY = 1.0) { |
| 652 | const gl = this.gl; |
no test coverage detected