# Post-processes autoclear question

**URL:** <https://forum.babylonjs.com/t/post-processes-autoclear-question/49402>\
**Category:** Questions\
**Tags:** postprocessing\
**Created:** [April 6, 2024, 2:11pm UTC](https://forum.babylonjs.com/t/post-processes-autoclear-question/49402 "2024-04-06T14:11:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![woniubushiniu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/woniubushiniu/32/22130_2.png) [@woniubushiniu](https://forum.babylonjs.com/u/woniubushiniu)\
**Post date:** [April 6, 2024, 2:11pm UTC](https://forum.babylonjs.com/t/post-processes-autoclear-question/49402/1 "2024-04-06T14:11:14Z")

</div>

In Babylon.js, many post-processes have their ‘autoclear’ set to false, and manual clearing of post-processes is not observed before rendering. At which step is the cleaning of the target content performed in post-processing? Could you please help me briefly analyze the process? Thank you very much for your assistance.

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 8, 2024, 7:34am UTC](https://forum.babylonjs.com/t/post-processes-autoclear-question/49402/2 "2024-04-08T07:34:09Z")

</div>

If a post-process `autoClear` property is `false`, then it is never cleared. We use it as an optimization when there’s no need to clear a post-process because the shader will write all pixels of the render target anyway.

---

<div class="post-metadata">

**Author:** ![woniubushiniu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/woniubushiniu/32/22130_2.png) [@woniubushiniu](https://forum.babylonjs.com/u/woniubushiniu)\
**Post date:** [April 8, 2024, 9:49am UTC](https://forum.babylonjs.com/t/post-processes-autoclear-question/49402/3 "2024-04-08T09:49:59Z")

</div>

Thank you for your reply. I understand. Before each post-processing starts rendering, the first post-processing will be cleaned or the preRender will clean the target.

---

<div class="post-metadata">

**Author:** ![woniubushiniu](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/woniubushiniu/32/22130_2.png) [@woniubushiniu](https://forum.babylonjs.com/u/woniubushiniu)\
**Post date:** [April 8, 2024, 10:49am UTC](https://forum.babylonjs.com/t/post-processes-autoclear-question/49402/4 "2024-04-08T10:49:52Z")

</div>

and StandardRenderingPipeline should also need related optimization, right?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [April 8, 2024, 4:13pm UTC](https://forum.babylonjs.com/t/post-processes-autoclear-question/49402/5 "2024-04-08T16:13:27Z")

</div>

`StandardRenderingPipeline` is deprecated and not supported anymore. You should use `DefaultRenderingPipeline` instead, which correctly handles the `autoClear` property of the different post processes.
