You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using EffectComposer to render to WebGLRenderTarget with samples > 0. My understanding is that it should create 2 render targets, and for each of them it should create 1 framebuffer, and two renderbuffers (1 color and 1 depth). However, when I inspect allocated memory with https://github.com/greggman/webgl-memory, I see that each render target creates 2 framebuffers, 3 renderbuffers and 1 texture. Looking at the code of WebGLTextures.setupRenderTarget I see there are two separate framebuffers, __webglFramebuffer and __webglMultisampleFramebuffer, with 2 multisample render buffers bound to the latter, and texture and regular depth buffer bound to the former. Yet when I look at the code in WebGLRenderer I see that __webglFramebuffer is never bound to anything when using multisample render target. My question is: is it a bug? Am I missing something?
Solution
Multisample render target should only allocate 1 framebuffer and 2 multisample render buffers
Alternatives
Additional context
No response
The text was updated successfully, but these errors were encountered:
Description
I'm using EffectComposer to render to WebGLRenderTarget with samples > 0. My understanding is that it should create 2 render targets, and for each of them it should create 1 framebuffer, and two renderbuffers (1 color and 1 depth). However, when I inspect allocated memory with https://github.com/greggman/webgl-memory, I see that each render target creates 2 framebuffers, 3 renderbuffers and 1 texture. Looking at the code of
WebGLTextures.setupRenderTarget
I see there are two separate framebuffers,__webglFramebuffer
and__webglMultisampleFramebuffer
, with 2 multisample render buffers bound to the latter, and texture and regular depth buffer bound to the former. Yet when I look at the code inWebGLRenderer
I see that__webglFramebuffer
is never bound to anything when using multisample render target. My question is: is it a bug? Am I missing something?Solution
Multisample render target should only allocate 1 framebuffer and 2 multisample render buffers
Alternatives
Additional context
No response
The text was updated successfully, but these errors were encountered: