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

KawaseBlurMaterial

Extends:

three~ShaderMaterial → KawaseBlurMaterial

Direct Subclass:

TiltShiftBlurMaterial

Implements:

An optimized convolution shader material.

References: Masaki Kawase, Bunkasha Games, GDC2003 Presentation: Frame Buffer Postprocessing Effects in DOUBLE-S.T.E.A.L (Wreckless) Filip Strugar, Intel, 2014: An investigation of fast real-time GPU-based image blur algorithms

Further modified according to Apple's Best Practices for Shaders.

Constructor Summary

Public Constructor
public

constructor(texelSize: Vector4)

Constructs a new convolution material.

Member Summary

Public Members
public set

inputBuffer: Texture

The input buffer.

public get

The current kernel.

public set
public get

The kernel sequence for the current kernel size.

public

The kernel size.

public get

The blur scale.

public set

Method Summary

Public Methods
public
this method was deprecated. Implementation detail, removed with no replacement.

Returns the kernel.

public
this method was deprecated. Use scale instead.

Returns the blur scale.

public

setInputBuffer(value: Texture)

this method was deprecated. Use inputBuffer instead.

Sets the input buffer.

public

setKernel(value: Number)

this method was deprecated. Use kernel instead.

Sets the current kernel.

public

setScale(value: *): Number

this method was deprecated. Use scale instead.

Sets the blur scale.

public

setSize(width: Number, height: Number)

Sets the size of this object.

public
this method was deprecated. Use setSize() instead.

Sets the texel size.

Public Constructors

public constructor(texelSize: Vector4) source

Constructs a new convolution material.

TODO Remove texelSize param.

Params:

NameTypeAttributeDescription
texelSize Vector4
  • optional

Deprecated.

Public Members

public set inputBuffer: Texture source

The input buffer.

public get kernel: Number source

The current kernel.

public set kernel source

public get kernelSequence: Float32Array source

The kernel sequence for the current kernel size.

public kernelSize: KernelSize source

The kernel size.

public get scale: Number source

The blur scale.

public set scale source

Public Methods

public getKernel(): Float32Array source

this method was deprecated. Implementation detail, removed with no replacement.

Returns the kernel.

Return:

Float32Array

The kernel.

public getScale(): Number source

this method was deprecated. Use scale instead.

Returns the blur scale.

Return:

Number

The scale.

public setInputBuffer(value: Texture) source

this method was deprecated. Use inputBuffer instead.

Sets the input buffer.

Params:

NameTypeAttributeDescription
value Texture

The input buffer.

public setKernel(value: Number) source

this method was deprecated. Use kernel instead.

Sets the current kernel.

Params:

NameTypeAttributeDescription
value Number

The kernel.

public setScale(value: *): Number source

this method was deprecated. Use scale instead.

Sets the blur scale.

Params:

NameTypeAttributeDescription
value *

Return:

Number

value - The scale.

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

Sets the size of this object.

Params:

NameTypeAttributeDescription
width Number

The width.

height Number

The height.

public setTexelSize(x: Number, y: Number) source

this method was deprecated. Use setSize() instead.

Sets the texel size.

Params:

NameTypeAttributeDescription
x Number

The texel width.

y Number

The texel height.