-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
WebGLRenderer: Ensure correct clear after transmission. #28445
Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
@Mugen87 I see, completely overlooked that possibility. Wouldn't that also mean that the shadow map rendering could theoretically leave the depth or colour write disabled? Haven't looked into it in detail, but it seems that a Wondering if it might be better to let |
I don't see in
Interesting. Maybe |
Or maybe even in |
That might be a better option, actually. In general I'd assume that calling At the same time, there might very well be code working under the assumption that |
That was the main reasons why I hesitated with changing |
Fixed #28420.
Description
This PR fixes a regression introduced in #28118.
After rendering the transmission, the depth (and color) buffer might not be writable which is required for the clear triggered via
background.render()
. Before #28118 the clear happened at the very beginning inrender()
so the buffer states were correct.The issue mentioned in #28420 (comment) is unrelated to this specific regression. When using
preserveDrawingBuffer: true
and settingautoClear = false
, textured backgrounds are not compatible since they don't perform depth testing. That means they always overwrite what is present in the (preserved) color attachment which is unwanted if you head for a trails-like effects./cc @mrxz