From 5438fd65e135a88305814d32a5ed17bc2da56e80 Mon Sep 17 00:00:00 2001 From: sbarex Date: Tue, 26 Nov 2024 23:38:13 +0100 Subject: [PATCH] Update webgldrawer.js Fixed a bug that caused a completely white image to be rendered when two-pass rendering mode was requested (required when multiple images, using transparency, or in debug mode). --- src/webgldrawer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webgldrawer.js b/src/webgldrawer.js index fa61afbc..52c4d109 100644 --- a/src/webgldrawer.js +++ b/src/webgldrawer.js @@ -449,7 +449,7 @@ gl.bindBuffer(gl.ARRAY_BUFFER, this._secondPass.bufferTexturePosition); gl.vertexAttribPointer(this._secondPass.aTexturePosition, 2, gl.FLOAT, false, 0, 0); gl.bindBuffer(gl.ARRAY_BUFFER, this._secondPass.bufferOutputPosition); - gl.vertexAttribPointer(this._firstPass.aOutputPosition, 2, gl.FLOAT, false, 0, 0); + gl.vertexAttribPointer(this._secondPass.aOutputPosition, 2, gl.FLOAT, false, 0, 0); // Draw the quad (two triangles) gl.drawArrays(gl.TRIANGLES, 0, 6);