PassNode: Fix depthTexture creation when depthBuffer: false#33239
PassNode: Fix depthTexture creation when depthBuffer: false#33239sunag merged 3 commits intomrdoob:devfrom
depthBuffer: false#33239Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
This PR introduces breakage in the AO demo. The following WebGPU warning appears now in the browser console: |
|
Yep I see the problem, the AO example uses this._historyRenderTarget = new RenderTarget( 1, 1, { depthBuffer: false, type: HalfFloatType, depthTexture: new DepthTexture() } );I'll work on a fix making sure to handle this case |
|
Thank you! BTW: I know it can feel off-putting if the own PR is reverted but I just want to say that I don't intend to be mean here^^. It's more about having a functional dev branch that does not irritate or hamper the work of other developers. I'm thankful for everyones understanding in that regard. |
|
No worries, I understand. Just happy to contribute and glad the regression was caught so soon after being merged. New PR is up now which fixes the issue. |
With
PassNodea depth texture was always being created even when explicitly setting{ depthBuffer: false }.Additonally,
Textures.updateRenderTarget()also handled depth before checking whether it was actually enabled. Because of that, a depth texture could end up being created even with depth disabled.This pr ensures that when creating a pass such as
no depth texture is created.