瀏覽代碼

Merge pull request #2427 from sebavan/ImageProcessing

FixExposure
David Catuhe 8 年之前
父節點
當前提交
7b73cf7aa9
共有 1 個文件被更改,包括 17 次插入3 次删除
  1. 17 3
      src/Materials/babylon.imageProcessingConfiguration.ts

+ 17 - 3
src/Materials/babylon.imageProcessingConfiguration.ts

@@ -117,11 +117,25 @@ module BABYLON {
             this._updateParameters();
         }
 
+        @serialize()
+        public _exposure = 1.0;
         /**
-         * Exposure used in the effect.
+         * Gets the Exposure used in the effect.
          */
-        @serialize()
-        public exposure = 1.0;
+        public get exposure(): number {
+            return this._exposure;
+        }
+        /**
+         * Sets the Exposure used in the effect.
+         */
+        public set exposure(value: number) {
+            if (this._exposure === value) {
+                return;
+            }
+
+            this._exposure = value;
+            this._updateParameters();
+        }
 
         @serialize()
         private _toneMappingEnabled = false;