O'Reilly logo

Babylon.js Essentials by Julien Moreau-Mathis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using post-process rendering pipelines with Babylon.js

Now, you are able to create post-processes and attach them to a camera. The problem is that if you manage multiple cameras in your project, then you'll have to dispose or detach post-processes in order to reattach them to a new camera. To facilitate the task, you can use the rendering pipelines. In other words, you can see a rendering pipeline as a list of post-processes, which you can attach to multiple cameras.

Create a rendering pipeline

The steps consist on creating a pipeline reference, adding the pipeline to the scene, and attaching the pipeline to the cameras.

Create a rendering pipeline, as follows:

var pipeline = new BABYLON.PostProcessRenderPipeline( engine, // The Babylon.js engine ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required