KawaseBlurMaterial
Extends:
Direct Subclass:
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 |
this method was deprecated. Use kernel instead.
Sets the current kernel. |
|
public |
this method was deprecated. Use scale instead.
Sets the blur scale. |
|
public |
Sets the size of this object. |
|
public |
setTexelSize(x: Number, y: Number) 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:
Name | Type | Attribute | Description |
texelSize | Vector4 |
|
Deprecated. |
Public Methods
public getKernel(): Float32Array source
Returns the kernel.
public getScale(): Number source
Returns the blur scale.
public setInputBuffer(value: Texture) source
Sets the input buffer.
Params:
Name | Type | Attribute | Description |
value | Texture | The input buffer. |
public setKernel(value: Number) source
Sets the current kernel.
Params:
Name | Type | Attribute | Description |
value | Number | The kernel. |
public setScale(value: *): Number source
Sets the blur scale.
Params:
Name | Type | Attribute | Description |
value | * |