浏览代码

multiply blur by hardware scaling to avoid major visual difference when hardware scaling is modified

Trevor Baron 7 年之前
父节点
当前提交
7619a5015c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/PostProcess/babylon.blurPostProcess.ts

+ 1 - 1
src/PostProcess/babylon.blurPostProcess.ts

@@ -68,7 +68,7 @@
 			super(name, "kernelBlur", ["delta", "direction", "cameraMinMaxZ"], ["circleOfConfusionSampler"], 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);
+				effect.setFloat2('delta', ((1 / this.width) * this.direction.x)*(1/this.getEngine().getHardwareScalingLevel()), ((1 / this.height) * this.direction.y)*(1/this.getEngine().getHardwareScalingLevel()));
 			});
 
             this.kernel = kernel;