Pass
Direct Subclass:
Indirect Subclass:
Implements:
An abstract pass.
Fullscreen passes use a shared fullscreen triangle: https://michaldrobot.com/2014/04/01/gcn-execution-patterns-in-full-screen-passes/
Static Member Summary
Static Public Members | ||
public static get |
fullscreenGeometry: BufferGeometry A shared fullscreen triangle. |
Constructor Summary
Public Constructor | ||
public |
constructor(name: String, scene: Scene, camera: Camera) Constructs a new pass. |
Member Summary
Public Members | ||
public |
Indicates whether this pass is enabled. |
|
public get |
fullscreenMaterial: Material The fullscreen material. |
|
public set |
|
|
public set |
mainCamera: Camera Sets the main camera. |
|
public set |
mainScene: Scene Sets the main scene. |
|
public |
The name of this pass. |
|
public |
Only relevant for subclassing. |
|
public |
Only relevant for subclassing. |
|
public get |
Sets the render to screen flag. |
|
public set |
|
Protected Members | ||
protected |
camera: Camera The camera. |
|
protected |
renderer: WebGLRenderer this member was deprecated.
The renderer. |
|
protected |
scene: Scene The scene to render. |
Method Summary
Public Methods | ||
public |
dispose() Performs a shallow search for disposable properties and deletes them. |
|
public |
getDepthTexture(): Texture Returns the current depth texture. |
|
public |
getFullscreenMaterial(): Material this method was deprecated. Use fullscreenMaterial instead.
Returns the current fullscreen material. |
|
public |
initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) Performs initialization tasks. |
|
public |
this method was deprecated. Use enabled instead.
Indicates whether this pass is enabled. |
|
public abstract |
render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean) Renders this pass. |
|
public |
setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategy) Sets the depth texture. |
|
public |
setEnabled(value: Boolean) this method was deprecated. Use enabled instead.
Enables or disables this pass. |
|
public |
setRenderer(renderer: WebGLRenderer) this method was deprecated.
Sets the renderer |
|
public |
Sets the size. |
Protected Methods | ||
protected |
setFullscreenMaterial(value: Material) this method was deprecated. Use fullscreenMaterial instead.
Sets the fullscreen material. |
Static Public Members
public static get fullscreenGeometry: BufferGeometry source
A shared fullscreen triangle.
The screen size is 2x2 units (NDC). A triangle needs to be 4x4 units to fill the screen.
Public Constructors
public constructor(name: String, scene: Scene, camera: Camera) source
Constructs a new pass.
Params:
Name | Type | Attribute | Description |
name | String |
|
The name of this pass. Does not have to be unique. |
scene | Scene |
|
The scene to render. The default scene contains a single mesh that fills the screen. |
camera | Camera |
|
A camera. Fullscreen effect passes don't require a camera. |
Public Members
public set fullscreenMaterial source
public needsDepthTexture: Boolean source
Only relevant for subclassing.
Indicates whether the EffectComposer should prepare a depth texture for this pass.
Set this to true
if this pass relies on depth information from a preceding RenderPass.
public needsSwap: Boolean source
Only relevant for subclassing.
Indicates whether the EffectComposer should swap the frame buffers after this pass has finished
rendering. Set this to false
if this pass doesn't render to the output buffer or the screen. Otherwise, the
contents of the input buffer will be lost.
public get renderToScreen: Boolean source
Sets the render to screen flag.
If this flag is changed, the fullscreen material will be updated as well.
public set renderToScreen source
Protected Members
Public Methods
public dispose() source
Performs a shallow search for disposable properties and deletes them.
The EffectComposer calls this method when it is being destroyed. You can use it independently to free memory when you're certain that you don't need this pass anymore.
public getDepthTexture(): Texture source
Returns the current depth texture.
Return:
Texture | The current depth texture, or null if there is none. |
public getFullscreenMaterial(): Material source
Returns the current fullscreen material.
Return:
Material | The current fullscreen material, or null if there is none. |
public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source
Performs initialization tasks.
This method is called when this pass is added to an EffectComposer.
public isEnabled(): Boolean source
Indicates whether this pass is enabled.
public abstract render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean) source
Renders this pass.
This is an abstract method that must be overridden.
Params:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
|
inputBuffer | WebGLRenderTarget | A frame buffer that contains the result of the previous pass. |
|
outputBuffer | WebGLRenderTarget | A frame buffer that serves as the output render target unless this pass renders to screen. |
|
deltaTime | Number |
|
The time between the last frame and the current one in seconds. |
stencilTest | Boolean |
|
Indicates whether a stencil mask is active. |
Throw:
An error is thrown if the method is not overridden. |
public setDepthTexture(depthTexture: Texture, depthPacking: DepthPackingStrategy) source
Sets the depth texture.
This method will be called automatically by the EffectComposer. You may override this method if your pass relies on the depth information of a preceding RenderPass.
Params:
Name | Type | Attribute | Description |
depthTexture | Texture | A depth texture. |
|
depthPacking | DepthPackingStrategy |
|
The depth packing. |
public setEnabled(value: Boolean) source
Enables or disables this pass.
Params:
Name | Type | Attribute | Description |
value | Boolean | Whether the pass should be enabled. |
public setRenderer(renderer: WebGLRenderer) source
Sets the renderer
Params:
Name | Type | Attribute | Description |
renderer | WebGLRenderer | The renderer. |
public setSize(width: Number, height: Number) source
Sets the size.
You may override this method if you want to be informed about the size of the backbuffer/canvas. This method is called before initialize and every time the size of the EffectComposer changes.
Protected Methods
protected setFullscreenMaterial(value: Material) source
Sets the fullscreen material.
Params:
Name | Type | Attribute | Description |
value | Material | A fullscreen material. |