Postprocess resize method

I have some heavy calculations in my postprocess pixel shader so I want to resize the postprocess dynamically to optimize. But I’m not able to change the param _options of postProcess as it is private now. Instead, I have to init a new postprocess to replace the old one. But GPU memory don’t release so fast as I init, and it will cause webGL context lost.
I’m wondering maybe it is needed to add a method to set the param _options?

Exposing _options won’t help, the GPU texture will still need to be recreated if the dimensions change.

GPU memory should be released if there are not enough available when trying to allocate more, but that’s something up to the browser/driver, we have no control over it.

Maybe you can try to create a pool of post processes and reuse the one with the right dimensions from the pool?

I used a slider to control it so this doesn’t work for my situation, I may keep the solution by limiting the resize frequency, thanks for explaining this!