Capítulo 274 de 859
A pass for a basic SSR effect.
const ssrPass = new SSRPass( {
renderer,
scene,
camera,
width: innerWidth,
height: innerHeight
} );
composer.addPass( ssrPass );
Constructor
| Signature |
|---|
new SSRPass( options : SSRPass~Options ) |
Properties
| Property | Description |
|---|---|
.blur : boolean | Whether to blur reflections or not. |
.bouncing : boolean | Whether bouncing is enabled or not. |
.camera : Camera | The camera. |
.clear : boolean | Overwritten to perform a clear operation by default. |
.distanceAttenuation : boolean | Whether to use distance attenuation or not. |
.fresnel : boolean | Whether to use fresnel or not. |
.groundReflector : ReflectorForSSRPass | The ground reflector. |
.height : number | The height of the effect. |
.infiniteThick : boolean | Whether to use infinite thickness or not. |
.maxDistance : number | Controls how far a fragment can reflect. |
.opacity : number | The opacity. |
.output : number | The output configuration. |
.renderer : WebGLRenderer | The renderer. |
.resolutionScale : number | The resolution scale. Valid values are in the range [0,1]. 1 means best quality but also results in more computational overhead. Setting to 0.5 means the effect is computed in half-resolution. |
.scene : Scene | The scene to render. |
.selective : boolean | Whether the pass is selective or not. |
.selects : Array.<Object3D> | Which 3D objects should be affected by SSR. If not set, the entire scene is affected. |
.thickness : number | Controls the cutoff between what counts as a possible reflection hit and what does not. |
.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 SSR pass. |
.setSize( width : number, height : number ) | Sets the size of the pass. |