From 9d7e44bea56166ac6bbe48de43b8627641fb95a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mois=C3=A9s=20Pel=C3=A1ez?= Date: Fri, 27 Mar 2026 14:11:59 -0400 Subject: [PATCH] Fix alpha handling on HTML5 and HL builds --- Backends/HTML5/kha/SystemImpl.hx | 4 ++-- Tools/khamake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Backends/HTML5/kha/SystemImpl.hx b/Backends/HTML5/kha/SystemImpl.hx index 1c30a02eb..33a428eb9 100644 --- a/Backends/HTML5/kha/SystemImpl.hx +++ b/Backends/HTML5/kha/SystemImpl.hx @@ -392,7 +392,7 @@ class SystemImpl { antialias: options.framebuffer.samplesPerPixel > 1, stencil: true }); // preserveDrawingBuffer: true } ); Warning: preserveDrawingBuffer can cause huge performance issues on mobile browsers - SystemImpl.gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1); + SystemImpl.gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0); halfFloat = {HALF_FLOAT_OES: 0x140B}; // GL_HALF_FLOAT depthTexture = {UNSIGNED_INT_24_8_WEBGL: 0x84FA}; // GL_UNSIGNED_INT_24_8 @@ -421,7 +421,7 @@ class SystemImpl { antialias: options.framebuffer.samplesPerPixel > 1, stencil: true }); // preserveDrawingBuffer: true } ); WARNING: preserveDrawingBuffer causes huge performance issues (on mobile browser)! - SystemImpl.gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 1); + SystemImpl.gl.pixelStorei(GL.UNPACK_PREMULTIPLY_ALPHA_WEBGL, 0); SystemImpl.gl.getExtension("OES_texture_float"); SystemImpl.gl.getExtension("OES_texture_float_linear"); halfFloat = SystemImpl.gl.getExtension("OES_texture_half_float"); diff --git a/Tools/khamake b/Tools/khamake index 6a859252b..157159fcd 160000 --- a/Tools/khamake +++ b/Tools/khamake @@ -1 +1 @@ -Subproject commit 6a859252b7ef6250f43d0a410e44e7ff1e538b2c +Subproject commit 157159fcd490fced852f63a807a2488463557da9