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

WebGLBackend: Fix context parameter. #30413

Merged
merged 2 commits into from
Jan 28, 2025
Merged

WebGLBackend: Fix context parameter. #30413

merged 2 commits into from
Jan 28, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 28, 2025

Related issue: -

Description

While trying to fix foveation with XRManager, I have noticed that the WebGL 2 rendering context is always created with antialias set to true. This has a side effect on XRManager as well as performance implications.

The antialias context parameter can always be set to false since the engine applies MSAA with custom renderbuffers.

With this change the framerate of the demanding SSAA demo improves from 45 to 53 FPS with a WebGL 2 backend (tested with Firefox). In fact, the overall performance of the WebGL backend has been improved since up to now the renderer applied MSAA on the fullscreen quad of the output pass.

@Mugen87 Mugen87 added this to the r173 milestone Jan 28, 2025
Copy link

github-actions bot commented Jan 28, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.27
78.29
336.27
78.29
+0 B
+0 B
WebGPU 512.43
142.36
512.43
142.37
+5 B
+13 B
WebGPU Nodes 511.89
142.25
511.9
142.27
+5 B
+13 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Before After Diff
WebGL 465.25
112.13
465.25
112.13
+0 B
+0 B
WebGPU 586.36
159.02
586.36
159.04
+5 B
+24 B
WebGPU Nodes 541.74
148.57
541.75
148.59
+5 B
+26 B

@Mugen87 Mugen87 merged commit 99b02bb into mrdoob:dev Jan 28, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant