From a7f919fbe1ee473a325b68ce11749884c6b3d653 Mon Sep 17 00:00:00 2001 From: Martin Valigursky Date: Wed, 6 Nov 2024 14:17:04 +0000 Subject: [PATCH] Disable MSAA on Android Firefox version newer than 123.0 --- 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}`); } } }