From 21ce7154556c5cc05888f3b2ad0ef8c5c2ad068a Mon Sep 17 00:00:00 2001 From: Martin Valigursky <59932779+mvaligursky@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:39:03 +0000 Subject: [PATCH] Disable MSAA on Android Firefox version newer than 123.0 (#7096) Co-authored-by: Martin Valigursky --- src/platform/graphics/webgl/webgl-graphics-device.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/platform/graphics/webgl/webgl-graphics-device.js b/src/platform/graphics/webgl/webgl-graphics-device.js index d1869749e34..a31dfc491f8 100644 --- a/src/platform/graphics/webgl/webgl-graphics-device.js +++ b/src/platform/graphics/webgl/webgl-graphics-device.js @@ -356,16 +356,18 @@ class WebglGraphicsDevice extends GraphicsDevice { Debug.log('Antialiasing has been turned off due to rendering issues on AppleWebKit 15.4'); } - // #5856 - turn off antialiasing on Windows Firefox - if (platform.browserName === 'firefox' && platform.name === 'windows') { + // #5856 - turn off antialiasing on Firefox running on Windows / Android + if (platform.browserName === 'firefox') { const ua = (typeof navigator !== 'undefined') ? navigator.userAgent : ''; const match = ua.match(/Firefox\/(\d+(\.\d+)*)/); const firefoxVersion = match ? match[1] : null; if (firefoxVersion) { const version = parseFloat(firefoxVersion); - if (version >= 120 || version === 115) { + const disableAntialias = (platform.name === 'windows' && (version >= 120 || version === 115)) || + (platform.name === 'android' && version >= 132); + if (disableAntialias) { options.antialias = false; - Debug.log(`Antialiasing has been turned off due to rendering issues on Windows Firefox esr115 and 120+. Current version: ${firefoxVersion}`); + Debug.log(`Antialiasing has been turned off due to rendering issues on Firefox ${platform.name} platform version ${firefoxVersion}`); } } }