Skip to content

Commit

Permalink
Restore to default value of UNPACK_PREMULTIPLY_ALPHA_WEBGL. (#616)
Browse files Browse the repository at this point in the history
Co-authored-by: lvpengwei <pengwei.lv@gmail.com>
  • Loading branch information
zenoslin and lvpengwei committed Nov 24, 2022
1 parent 7a0bba4 commit 6671a9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions web/src/core/native-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export class NativeImage {
const gl = GL.currentContext?.GLctx as WebGLRenderingContext;
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, true);
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, this.source);
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
}

public onDestroy() {
Expand Down
1 change: 1 addition & 0 deletions web/src/wechat/array-buffer-image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ export class ArrayBufferImage {
gl.UNSIGNED_BYTE,
new Uint8Array(this.buffer),
);
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
}
}

0 comments on commit 6671a9d

Please sign in to comment.