When 48-th string is false we have only 4 textures (skyBox, Fire, ground-2x)
When 48-th string is true and we delete SSR after it’s creation we have 14 textures.
Hey @simon I’m having a look ASAP !
Can you confirm that if you write “scene.disableGeometryBufferRenderer()” (something like then) then you don’t have the extra textures anymore ? The SSR post-process enables the geometry buffer renderer that provides the necessary informations to compute reflections
Hi checked with the prepass renderer as well and I don’t return to 4 textures in memory. @sebavan, the SSR post-process doesn’t implement the dispose function, it let’s the PostProcess class doing the dispose (because I have nothing to dispose ahah). Do you think that the problem can come from the prepass renderer or geometry buffer renderer? I reproduce exactly the same problem with motion blur post-process and SSAO2 rendering pipeline: https://playground.babylonjs.com/#20OAV9#4762 (see the alerts showing the textures count)
MultiRenderTarget didn’t properly release the Texture wrapper around the InternalTexture. No memory leak on the GPU, but empty wrappers stayed in scene.textures.
Be careful though, when you enable SSAO2 then dispose it, the prepass will still be active, and the associated PrePassRenderTargets won’t be disposed . It does that to avoid destruction/recreation when rapidly changing the list of effects.
If you really want to clean all of the textures, you have to add scene.disablePrePassRenderer(); like in this PG