-
-
Notifications
You must be signed in to change notification settings - Fork 35.6k
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: autoClear bug #30589
Comments
Can you please demonstrate the issue with a fiddle? You can use the following one that holds the code of https://jsfiddle.net/j8qk0us5/1/ Both backends render the same for me, tested on latest Chrome on macOS 15.3.1. |
Oh that is strange, I can't reproduce it on Linux with AMD integrated graphics, or macOS. Here's the fiddle: https://jsfiddle.net/zonkypop/jyuchq4p/2/ But it does look mangled with an RTX 3090 on Linux on Chrome (tested 131, 133). It needs: antialias: true for it to happen, and looks fine without antialiasing. It looks fine on Firefox with the same machine. I'll have a poke around today and see if I can find any clues. |
I'm able to reproduce it in on Windows 11 with a RTX 3070 as well, but only Chrome, not Firefox. So might be Chrome+Nvidia related. |
So the combination is WebGLBackend + MSAA + Nvidia card + Chrome, right? The OS does not seem to matter. |
Yes seems to be, the bug's there for Linux and Windows |
A workaround is adding useFrameBufferTarget to:
and calling: To disable the final quad pass, which fixes the issue. This introduces other problems like needing color conversion in the shader and no post processing though. |
Can you please share a GPU report from one of the affected systems by typing |
Can you also test if this example works on the affected devices? https://threejs.org/examples/webgl_multisampled_renderbuffers |
Here's the report for the Linux machine: about-gpu-2025-02-23T22-36-39-962Z.txt https://threejs.org/examples/webgl_multisampled_renderbuffers seems to look fine |
Can you try one thing and remove the following three.js/src/renderers/webgl-fallback/WebGLBackend.js Lines 556 to 574 in 5323b5e
|
🥳 Wahay, that seems to have fixed it for both Linux and Windows! |
I've remembered that the |
Out of curiosity: Does the following WebGL conformance test pass on your affected devices? |
All the tests are passing: TEST COMPLETE: 41 PASS, 0 FAIL
Ah that is interesting, hmm I can do a bit of testing on the Quest 3 to see the perf difference of removing/adding the gl.invalidateSubFramebuffer. I was wondering if the quad pass has much overhead? The Quest 3 seems to working fine with the new WebGLBackend / TSL though! |
We need #30437 to restore foveation which does currently not work with the new renderer. That should further improve the performance on Quest devices. Um, it would be good if the WebGL conformance test could actually catch the issue on your devices. If you could manage to reproduce the breakage by modifying the test and commiting the change that could be an welcome contribution to the WebGL conformance test suite. |
Description
When using the WebGL fallback renderer, autoClear seems to be causing issues:
This can be reproduced by adding:
in the https://threejs.org/examples/?q=light%20probe#webgpu_lightprobe example and using
forceWebGL: true
for the renderer.Setting
antialias: false
will make it not look mangled but there are still issues with it not clearing (update: I think those issues were unrelated).I'm not getting the same issue when using WebGPU or the WebGL example.
Version
174dev
Device
Desktop
Browser
Chrome
OS
Linux
The text was updated successfully, but these errors were encountered: