Capítulo 268 de 859
A SAO implementation inspired from @bhouston previous SAO work.
SAOPass provides better quality than SSAOPass but is also more expensive.
const saoPass = new SAOPass( scene, camera );
composer.addPass( saoPass );
Constructor
| Signature |
|---|
new SAOPass( scene : Scene, camera : Camera, resolution : Vector2 ) |
Properties
| Property | Description |
|---|---|
.camera : Camera | The camera. |
.clear : boolean | Overwritten to perform a clear operation by default. |
.needsSwap : boolean | Overwritten to disable the swap. |
.params : Object | The SAO parameter. |
.resolution : Vector2 | The effect's resolution. |
.scene : Scene | The scene to render the AO for. |
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 SAO pass. |
.setSize( width : number, height : number ) | Sets the size of the pass. |