(params, inputTexture, width, height, flipY = 1.0)
| 667 | } |
| 668 | |
| 669 | _renderVignette(params, inputTexture, width, height, flipY = 1.0) { |
| 670 | const gl = this.gl; |
| 671 | const program = this.programs.vignette; |
| 672 | |
| 673 | this._useProgram(program, flipY); |
| 674 | |
| 675 | gl.activeTexture(gl.TEXTURE0); |
| 676 | gl.bindTexture(gl.TEXTURE_2D, inputTexture); |
| 677 | |
| 678 | const color = this._hexToRgb(params.color); |
| 679 | |
| 680 | gl.uniform1i(program.uniforms.u_image, 0); |
| 681 | gl.uniform1f(program.uniforms.u_intensity, params.intensity); |
| 682 | gl.uniform1f(program.uniforms.u_size, params.size); |
| 683 | gl.uniform1f(program.uniforms.u_softness, params.softness); |
| 684 | gl.uniform3f(program.uniforms.u_color, color[0], color[1], color[2]); |
| 685 | gl.uniform2f(program.uniforms.u_resolution, width, height); |
| 686 | |
| 687 | gl.drawArrays(gl.TRIANGLES, 0, 6); |
| 688 | } |
| 689 | |
| 690 | _renderScanlines(params, inputTexture, width, height, flipY = 1.0, renderScale = 1.0) { |
| 691 | const gl = this.gl; |
no test coverage detected