Skip to content

Commit

Permalink
Disable MSAA on Android Firefox version newer than 123.0 (#7096)
Browse files Browse the repository at this point in the history
Co-authored-by: Martin Valigursky <[email protected]>
  • Loading branch information
mvaligursky and Martin Valigursky authored Nov 6, 2024
1 parent 3e0d989 commit 21ce715
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/platform/graphics/webgl/webgl-graphics-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
}
}
Expand Down

0 comments on commit 21ce715

Please sign in to comment.