|
@@ -7,7 +7,7 @@
|
|
|
protected _kernel: number;
|
|
|
protected _idealKernel: number;
|
|
|
protected _packedFloat: boolean = false;
|
|
|
- protected _staticDefines:string = ""
|
|
|
+ private _staticDefines:string = ""
|
|
|
/**
|
|
|
* Sets the length in pixels of the blur sample region
|
|
|
*/
|
|
@@ -59,9 +59,9 @@
|
|
|
* @param reusable If the post process can be reused on the same frame. (default: false)
|
|
|
* @param textureType Type of textures used when performing the post process. (default: 0)
|
|
|
*/
|
|
|
- constructor(name: string, /** The direction in which to blur the image. */ public direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT) {
|
|
|
+ constructor(name: string, /** The direction in which to blur the image. */ public direction: Vector2, kernel: number, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, reusable?: boolean, textureType: number = Engine.TEXTURETYPE_UNSIGNED_INT, defines = "") {
|
|
|
super(name, "kernelBlur", ["delta", "direction", "cameraMinMaxZ"], ["depthSampler"], options, camera, samplingMode, engine, reusable, null, textureType, "kernelBlur", {varyingCount: 0, depCount: 0}, true);
|
|
|
-
|
|
|
+ this._staticDefines = defines;
|
|
|
this.onApplyObservable.add((effect: Effect) => {
|
|
|
effect.setFloat2('delta', (1 / this.width) * this.direction.x, (1 / this.height) * this.direction.y);
|
|
|
});
|