Godot version
v4.0.3.stable.official.5222a99f5
System information
Windows 11, Vulkan API 1.2.175 - Forward Mobile - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GT 730
Issue description
There's a memory leakage when running a simple scene with a WorldEnvironment and glow enabled, when the Viewport changes it's size, when I go to the Video Memory debugger monitor, the memory usage increases rapidly every time I resize the Viewport, but only when the glow effect is enabled. The memory usage can go beyond 1 GiB easily, before slowing the whole computer down and forcing me to close the running scene.

Steps to reproduce
- Create a simple 3D scene with a Camera3D, a MeshInstance3D and a WorldEnvironment with glow enabled;
- In the project's settings, change the window stretch mode and aspect so that the base Viewport changes size according to the window (viewport mode aspect expand, for example);
- Run the scene and keep resizing the window and watch the Video Memory debugger monitor (be careful in this part, the memory usage can go crazy and can easily freeze the entire computer).
Minimal reproduction project
test.zip
Godot version
v4.0.3.stable.official.5222a99f5
System information
Windows 11, Vulkan API 1.2.175 - Forward Mobile - Using Vulkan Device #0: NVIDIA - NVIDIA GeForce GT 730
Issue description
There's a memory leakage when running a simple scene with a WorldEnvironment and glow enabled, when the Viewport changes it's size, when I go to the Video Memory debugger monitor, the memory usage increases rapidly every time I resize the Viewport, but only when the glow effect is enabled. The memory usage can go beyond 1 GiB easily, before slowing the whole computer down and forcing me to close the running scene.
Steps to reproduce
Minimal reproduction project
test.zip