FXAAPass class

Basic usage

The FXAAPass lets you easily add a Fast Approximate Anti-Aliasing pass to your scene.

The fragment shader code used for that FXAA pass has been taken from here:

To create a FXAAPass, just use its constructor:

// "canvas" is the ID of our HTML container element
const curtains = new Curtains({
container: "canvas"
// create our FXAA pass using our curtains object
const fxaaPass = new FXAAPass(curtains);


To create a FXAAPass you will have to pass your curtains object as the first parameter.
You can add an additional parameter object in which you can pass the following ShaderPass parameters options: clear, depth, depthTest, renderTarget, texturesOptions.


  • pass (ShaderPass class object): v7.0

    The ShaderPass used to apply the FXAA effect.