Home Reference Source
import {KawaseBlurPass} from 'postprocessing'
public class | source

KawaseBlurPass

Extends:

Pass → KawaseBlurPass

Direct Subclass:

TiltShiftBlurPass

Indirect Implements:

A Kawase blur pass.

Provides better performance compared to GaussianBlurPass at larger kernel sizes.

Static Member Summary

Static Public Members
public static get
this get was deprecated. Use {@link Resolution.AUTO_SIZE} instead.

An auto sizing flag.

Constructor Summary

Public Constructor
public

constructor(options: Object)

Constructs a new Kawase blur pass.

Member Summary

Public Members
public get

The blur material.

public

A copy material.

public get
this get was deprecated. Use copyMaterial.dithering instead.

Indicates whether dithering is enabled.

public set
public
public get
this get was deprecated. Use resolution.height instead.

The current height of the internal render targets.

public set
this set was deprecated. Use resolution.preferredHeight instead.

Sets the render height.

public get
this get was deprecated. Use blurMaterial.kernelSize instead.

The kernel size.

public set
public get
this get was deprecated. Use blurMaterial.scale instead.

The current blur scale.

public set
public get
this get was deprecated. Use resolution.width instead.

The current width of the internal render targets.

public set
this set was deprecated. Use resolution.preferredWidth instead.

Sets the render width.

Protected Members
protected set

The blur material.

Method Summary

Public Methods
public
this method was deprecated. Use blurMaterial.kernelSize instead.

Returns the kernel size.

public
this method was deprecated. Use resolution instead.

Returns the resolution settings.

public
this method was deprecated. Use resolution instead.

Returns the current resolution scale.

public
this method was deprecated. Use blurMaterial.scale instead.

Returns the current blur scale.

public

initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number)

Performs initialization tasks.

public

render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean)

Renders the blur.

public
this method was deprecated. Use blurMaterial.kernelSize instead.

Sets the kernel size.

public
this method was deprecated. Use resolution instead.

Sets the resolution scale.

public

setScale(value: Number)

this method was deprecated. Use blurMaterial.scale instead.

Sets the blur scale.

public

setSize(width: Number, height: Number)

Updates the size of this pass.

Inherited Summary

From class Pass
public static get

fullscreenGeometry: BufferGeometry

A shared fullscreen triangle.

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 get

Sets the render to screen flag.

public set
public

Indicates whether this pass is enabled.

public

The name of this pass.

public

Only relevant for subclassing.

public

Only relevant for subclassing.

protected

camera: Camera

The camera.

protected

renderer: WebGLRenderer

this member was deprecated.

The renderer.

protected

scene: Scene

The scene to render.

public

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
this method was deprecated. Use enabled instead.

Enables or disables this pass.

public

setRenderer(renderer: WebGLRenderer)

this method was deprecated.

Sets the renderer

public

setSize(width: Number, height: Number)

Sets the size.

protected

setFullscreenMaterial(value: Material)

this method was deprecated. Use fullscreenMaterial instead.

Sets the fullscreen material.

Static Public Members

public static get AUTO_SIZE: Number source

this get was deprecated. Use {@link Resolution.AUTO_SIZE} instead.

An auto sizing flag.

Public Constructors

public constructor(options: Object) source

Constructs a new Kawase blur pass.

Override:

Pass#constructor

Params:

NameTypeAttributeDescription
options Object
  • optional

The options.

options.kernelSize KernelSize
  • optional
  • default: KernelSize.MEDIUM

The blur kernel size.

options.resolutionScale Number
  • optional
  • default: 0.5

The resolution scale.

options.resolutionX Number
  • optional
  • default: Resolution.AUTO_SIZE

The horizontal resolution.

options.resolutionY Number
  • optional
  • default: Resolution.AUTO_SIZE

The vertical resolution.

options.width Number
  • optional
  • default: Resolution.AUTO_SIZE

Deprecated. Use resolutionX instead.

options.height Number
  • optional
  • default: Resolution.AUTO_SIZE

Deprecated. Use resolutionY instead.

Public Members

public get blurMaterial: KawaseBlurMaterial source

The blur material.

public copyMaterial: CopyMaterial source

A copy material.

public get dithering: Boolean source

this get was deprecated. Use copyMaterial.dithering instead.

Indicates whether dithering is enabled.

public set dithering source

public fullscreenMaterial: * source

The fullscreen material.

Override:

Pass#fullscreenMaterial

public get height: Number source

this get was deprecated. Use resolution.height instead.

The current height of the internal render targets.

public set height: Number source

this set was deprecated. Use resolution.preferredHeight instead.

Sets the render height.

public get kernelSize: KernelSize source

this get was deprecated. Use blurMaterial.kernelSize instead.

The kernel size.

public set kernelSize source

public get scale: Number source

this get was deprecated. Use blurMaterial.scale instead.

The current blur scale.

public set scale source

public get width: Number source

this get was deprecated. Use resolution.width instead.

The current width of the internal render targets.

public set width: Number source

this set was deprecated. Use resolution.preferredWidth instead.

Sets the render width.

Protected Members

protected set blurMaterial: KawaseBlurMaterial source

The blur material.

Public Methods

public getKernelSize(): KernelSize source

this method was deprecated. Use blurMaterial.kernelSize instead.

Returns the kernel size.

Return:

KernelSize

The kernel size.

public getResolution(): Resolution source

this method was deprecated. Use resolution instead.

Returns the resolution settings.

Return:

Resolution

The resolution.

public getResolutionScale(): Number source

this method was deprecated. Use resolution instead.

Returns the current resolution scale.

Return:

Number

The resolution scale.

public getScale(): Number source

this method was deprecated. Use blurMaterial.scale instead.

Returns the current blur scale.

Return:

Number

The scale.

public initialize(renderer: WebGLRenderer, alpha: Boolean, frameBufferType: Number) source

Performs initialization tasks.

Override:

Pass#initialize

Params:

NameTypeAttributeDescription
renderer WebGLRenderer

The renderer.

alpha Boolean

Whether the renderer uses the alpha channel or not.

frameBufferType Number

The type of the main frame buffers.

public render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget, outputBuffer: WebGLRenderTarget, deltaTime: Number, stencilTest: Boolean) source

Renders the blur.

Override:

Pass#render

Params:

NameTypeAttributeDescription
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
  • optional

The time between the last frame and the current one in seconds.

stencilTest Boolean
  • optional

Indicates whether a stencil mask is active.

public setKernelSize(value: KernelSize) source

this method was deprecated. Use blurMaterial.kernelSize instead.

Sets the kernel size.

Larger kernels require more processing power but scale well with larger render resolutions.

Params:

NameTypeAttributeDescription
value KernelSize

The kernel size.

public setResolutionScale(scale: Number) source

this method was deprecated. Use resolution instead.

Sets the resolution scale.

Params:

NameTypeAttributeDescription
scale Number

The new resolution scale.

public setScale(value: Number) source

this method was deprecated. Use blurMaterial.scale instead.

Sets the blur scale.

Params:

NameTypeAttributeDescription
value Number

The scale.

public setSize(width: Number, height: Number) source

Updates the size of this pass.

Override:

Pass#setSize

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.