()
| 10 | this.type = 'ArrayTexture(1)'; |
| 11 | } |
| 12 | renderRawOutput() { |
| 13 | const gl = this.context; |
| 14 | const size = this.size; |
| 15 | gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer()); |
| 16 | gl.framebufferTexture2D( |
| 17 | gl.FRAMEBUFFER, |
| 18 | gl.COLOR_ATTACHMENT0, |
| 19 | gl.TEXTURE_2D, |
| 20 | this.texture, |
| 21 | 0 |
| 22 | ); |
| 23 | const result = new Float32Array(size[0] * size[1] * 4); |
| 24 | gl.readPixels(0, 0, size[0], size[1], gl.RGBA, gl.FLOAT, result); |
| 25 | return result; |
| 26 | } |
| 27 | renderValues() { |
| 28 | if (this._deleted) return null; |
| 29 | return this.renderRawOutput(); |
no test coverage detected