|
@@ -9,6 +9,7 @@ module BABYLON {
|
|
class GlowBlurPostProcess extends PostProcess {
|
|
class GlowBlurPostProcess extends PostProcess {
|
|
constructor(name: string, public direction: Vector2, public kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, reusable?: boolean) {
|
|
constructor(name: string, public direction: Vector2, public kernel: number, options: number | PostProcessOptions, camera: Camera, samplingMode: number = Texture.BILINEAR_SAMPLINGMODE, engine?: Engine, reusable?: boolean) {
|
|
super(name, "glowBlurPostProcess", ["screenSize", "direction", "blurWidth"], null, options, camera, samplingMode, engine, reusable);
|
|
super(name, "glowBlurPostProcess", ["screenSize", "direction", "blurWidth"], null, options, camera, samplingMode, engine, reusable);
|
|
|
|
+
|
|
this.onApplyObservable.add((effect: Effect) => {
|
|
this.onApplyObservable.add((effect: Effect) => {
|
|
effect.setFloat2("screenSize", this.width, this.height);
|
|
effect.setFloat2("screenSize", this.width, this.height);
|
|
effect.setVector2("direction", this.direction);
|
|
effect.setVector2("direction", this.direction);
|
|
@@ -262,14 +263,14 @@ module BABYLON {
|
|
|
|
|
|
// Adapt options
|
|
// Adapt options
|
|
this._options = options || {
|
|
this._options = options || {
|
|
- mainTextureRatio: 0.25,
|
|
|
|
|
|
+ mainTextureRatio: 0.5,
|
|
blurTextureSizeRatio: 0.5,
|
|
blurTextureSizeRatio: 0.5,
|
|
- blurHorizontalSize: 1,
|
|
|
|
- blurVerticalSize: 1,
|
|
|
|
|
|
+ blurHorizontalSize: 1.0,
|
|
|
|
+ blurVerticalSize: 1.0,
|
|
alphaBlendingMode: Engine.ALPHA_COMBINE
|
|
alphaBlendingMode: Engine.ALPHA_COMBINE
|
|
};
|
|
};
|
|
- this._options.mainTextureRatio = this._options.mainTextureRatio || 0.25;
|
|
|
|
- this._options.blurTextureSizeRatio = this._options.blurTextureSizeRatio || 0.5;
|
|
|
|
|
|
+ this._options.mainTextureRatio = this._options.mainTextureRatio || 0.5;
|
|
|
|
+ this._options.blurTextureSizeRatio = this._options.blurTextureSizeRatio || 1.0;
|
|
this._options.blurHorizontalSize = this._options.blurHorizontalSize || 1;
|
|
this._options.blurHorizontalSize = this._options.blurHorizontalSize || 1;
|
|
this._options.blurVerticalSize = this._options.blurVerticalSize || 1;
|
|
this._options.blurVerticalSize = this._options.blurVerticalSize || 1;
|
|
this._options.alphaBlendingMode = this._options.alphaBlendingMode || Engine.ALPHA_COMBINE;
|
|
this._options.alphaBlendingMode = this._options.alphaBlendingMode || Engine.ALPHA_COMBINE;
|