Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable MSAA on Android Firefox version newer than 123.0 #7096

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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