Capítulo 255 de 859
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 );
Constructor
| Signature |
|---|
new GTAOPass( scene : Scene, camera : Camera, width : number, height : number, parameters : Object, aoParameters : Object, pdParameters : Object ) |
Properties
| Property | Description |
|---|---|
.blendIntensity : number | The AO blend intensity. |
.camera : Camera | The camera. |
.clear : boolean | Overwritten to perform a clear operation by default. |
.gtaoMap : Texture (readonly) | A texture holding the computed AO. |
.height : number | The height of the effect. |
.output : number | The output configuration. |
.pdRadiusExponent : number | The Poisson Denoise radius exponent. |
.pdRings : number | The number of Poisson Denoise rings. |
.pdSamples : number | The Poisson Denoise sample count. |
.scene : Scene | The scene to render the AO for. |
.width : number | The width of the effect. |
Methods
| Method | Description |
|---|---|
.dispose() | Frees the GPU-related resources allocated by this instance. Call this method whenever the pass is no longer used in your app. |
.render( renderer : WebGLRenderer, writeBuffer : WebGLRenderTarget, readBuffer : WebGLRenderTarget, deltaTime : number, maskActive : boolean ) | Performs the GTAO pass. |
.setGBuffer( depthTexture : DepthTexture, normalTexture : DepthTexture ) | Configures the GBuffer of this pass. If no arguments are passed, the pass creates an internal render target for holding depth and normal data. |
.setSceneClipBox( box : Box3 ) | Configures the clip box of the GTAO shader with the given AABB. |
.setSize( width : number, height : number ) | Sets the size of the pass. |
.updateGtaoMaterial( parameters : Object ) | Updates the GTAO material from the given parameter object. |
.updatePdMaterial( parameters : Object ) | Updates the Denoise material from the given parameter object. |