Setting Up Three.js for Postprocessing
Learn how to set up postprocessing in the Three.js scene.
Configuring postprocessing
In our first example of this course, we set up a rendering loop that we’ve used throughout the course, in order to render and animate our scenes. For postprocessing, we need to make a couple of changes to this setup to allow Three.js to postprocess the final rendering.
To set up Three.js for postprocessing, we have to make a couple of changes to our current setup, as follows:
Create
EffectComposer
, which can be used to add postprocessing passes.Configure
EffectComposer
so that it can render our scene and apply any additional postprocessing steps.In the
render
loop, useEffectComposer
to render the scene, apply the configured postprocessing steps, and show the output.
Example: Basic setup
We will show an example that we can use to experiment with and adapt for our own ...