Skip to content

Commit 809b8a4

Browse files
committed
The WebGLRenderer.updateCanvasTexture method will now set gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL to true, which should stop issues where you update a Text Game Object, having added a Render Texture or Spine Game Object to the Scene after it, which switches the PMA setting. Fix phaserjs#5064
1 parent 76ce778 commit 809b8a4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2812,6 +2812,7 @@ var WebGLRenderer = new Class({
28122812
gl.bindTexture(gl.TEXTURE_2D, dstTexture);
28132813

28142814
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, flipY);
2815+
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
28152816

28162817
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas);
28172818

0 commit comments

Comments
 (0)