(params, inputTexture, width, height, flipY = 1.0, renderScale = 1.0)
| 1038 | } |
| 1039 | |
| 1040 | _renderBloom(params, inputTexture, width, height, flipY = 1.0, renderScale = 1.0) { |
| 1041 | const gl = this.gl; |
| 1042 | const program = this.programs.bloom; |
| 1043 | |
| 1044 | this._useProgram(program, flipY); |
| 1045 | |
| 1046 | gl.activeTexture(gl.TEXTURE0); |
| 1047 | gl.bindTexture(gl.TEXTURE_2D, inputTexture); |
| 1048 | |
| 1049 | // Scale radius proportionally to render resolution so export matches preview |
| 1050 | const scaledRadius = params.radius * renderScale; |
| 1051 | |
| 1052 | gl.uniform1i(program.uniforms.u_image, 0); |
| 1053 | gl.uniform1f(program.uniforms.u_radius, scaledRadius); |
| 1054 | gl.uniform1f(program.uniforms.u_intensity, params.intensity); |
| 1055 | gl.uniform1f(program.uniforms.u_threshold, params.threshold); |
| 1056 | gl.uniform1f(program.uniforms.u_softThreshold, params.softThreshold); |
| 1057 | gl.uniform1i(program.uniforms.u_blendMode, this._blendModeToInt(params.blendMode)); |
| 1058 | gl.uniform2f(program.uniforms.u_resolution, width, height); |
| 1059 | |
| 1060 | gl.drawArrays(gl.TRIANGLES, 0, 6); |
| 1061 | } |
| 1062 | |
| 1063 | _renderRadialBlur(params, inputTexture, width, height, flipY = 1.0) { |
| 1064 | const gl = this.gl; |
no test coverage detected