(params, inputTexture, width, height, flipY = 1.0)
| 775 | } |
| 776 | |
| 777 | _renderPosterize(params, inputTexture, width, height, flipY = 1.0) { |
| 778 | const gl = this.gl; |
| 779 | const program = this.programs.posterize; |
| 780 | |
| 781 | this._useProgram(program, flipY); |
| 782 | |
| 783 | gl.activeTexture(gl.TEXTURE0); |
| 784 | gl.bindTexture(gl.TEXTURE_2D, inputTexture); |
| 785 | |
| 786 | gl.uniform1i(program.uniforms.u_image, 0); |
| 787 | gl.uniform1i(program.uniforms.u_levels, params.levels); |
| 788 | gl.uniform1i(program.uniforms.u_preserveHue, params.preserveHue ? 1 : 0); |
| 789 | |
| 790 | gl.drawArrays(gl.TRIANGLES, 0, 6); |
| 791 | } |
| 792 | |
| 793 | _renderEdge(params, inputTexture, width, height, flipY = 1.0) { |
| 794 | const gl = this.gl; |
no test coverage detected