File: GTAOPass.md | Updated: 11/15/2025
A pass for an GTAO effect.
GTAOPass provides better quality than SSAOPass but is also more expensive.
const gtaoPass = new GTAOPass( scene, camera, width, height );
gtaoPass.output = GTAOPass.OUTPUT.Denoise;
composer.addPass( gtaoPass );
GTAOPass is an addon, and must be imported explicitly, see Installation#Addons.
import { GTAOPass } from 'three/addons/postprocessing/GTAOPass.js';
Constructs a new GTAO pass.
scene | The scene to compute the AO for.
---|---
camera | The camera.
width | The width of the effect. Default is 512.
height | The height of the effect. Default is 512.
parameters | The pass parameters.
aoParameters | The AO parameters.
pdParameters | The denoise parameters.
The AO blend intensity.
Default is 1.
The camera.
Overwritten to perform a clear operation by default.
Default is true.
Overrides: Pass#clear
A texture holding the computed AO.
The height of the effect.
Default is 512.
The output configuration.
Default is 0.
The Poisson Denoise radius exponent.
Default is 2.
The number of Poisson Denoise rings.
Default is 2.
The Poisson Denoise sample count.
Default is 16.
The scene to render the AO for.
The width of the effect.
Default is 512.
Frees the GPU-related resources allocated by this instance. Call this method whenever the pass is no longer used in your app.
Overrides: Pass#dispose
Performs the GTAO pass.
renderer | The renderer.
---|---
writeBuffer | The write buffer. This buffer is intended as the rendering destination for the pass.
readBuffer | The read buffer. The pass can access the result from the previous pass from this buffer.
deltaTime | The delta time in seconds.
maskActive | Whether masking is active or not.
Overrides: Pass#render
Configures the GBuffer of this pass. If no arguments are passed, the pass creates an internal render target for holding depth and normal data.
depthTexture | The depth texture.
---|---
normalTexture | The normal texture.
Configures the clip box of the GTAO shader with the given AABB.
box | The AABB enclosing the scene that should receive AO. When passing null, to clip box is used.
---|---
Sets the size of the pass.
width | The width to set.
---|---
height | The height to set.
Overrides: Pass#setSize
Updates the GTAO material from the given parameter object.
parameters | The GTAO material parameters.
---|---
Updates the Denoise material from the given parameter object.
parameters | The denoise parameters.
---|---