Disabling and enabling a PostProcessRenderPipeline

i’m using the ´DefaultRenderingPipeline´ and on top of that i would like to blur the image in some situations, but have the blur disabled during normal operation. For this i created a new PostProcessRenderPipeline with a horizontal and vertical blur. This works wonderfully, but when i try to disable the render pipeline i can’t get it to behave as i’d wish. I tried all kinds of methods, removing the camera, detaching the camera via scene.postProcessRenderPipelineManager.detachCamerasFromRenderPipeline, disposing the PostProcesses – it either does not disable the effect, or i get an error. Shouldn’t there be an easy way to enable and disable the pipeline, isn’t that a common thing to do? What am i missing?
I could also just set the blur kernel to zero, but i’m having some concerns about performance there. Maybe they are unfounded?
Anyways, i’d be grateful for a nudge in the right direction!


Hello and welcome!

Here is the small example - https://playground.babylonjs.com/#08A2BS#129
It will detach blur from camera after 2 seconds.
Here - https://playground.babylonjs.com/#08A2BS#130 - blur postprocess will be attached to camera again after 5 seconds from the start.

1 Like

Thank you! That works. For some reason i was attached to the idea of having the effects be part of a render pipeline, but this solution will do just fine :slight_smile:


And when you don’t need postprocess anymore just dispose it - https://playground.babylonjs.com/#08A2BS#131 (after 7 seconds).
There are also a lot of options to play with Inspector.