Browse Source

Add dithering support in engine

David Catuhe 8 years ago
parent
commit
8dceb6bcc0

File diff suppressed because it is too large
+ 4613 - 4612
dist/preview release/babylon.d.ts


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.js


+ 1 - 1
dist/preview release/babylon.max.js

@@ -7016,7 +7016,7 @@ var BABYLON;
             this.isPointerLock = false;
             this.cullBackFaces = true;
             this.renderEvenInBackground = true;
-            this.preventCacheWipeBetweenFrames = false;
+            this.preventCacheWipeBetweenFrames = true;
             // To enable/disable IDB support and avoid XHR on .manifest
             this.enableOfflineSupport = BABYLON.Database;
             this.scenes = new Array();

File diff suppressed because it is too large
+ 4613 - 4612
dist/preview release/babylon.module.d.ts


File diff suppressed because it is too large
+ 1 - 1
dist/preview release/babylon.worker.js


+ 8 - 0
src/babylon.engine.ts

@@ -966,6 +966,14 @@
             this._stencilState.stencilOpStencilDepthPass = operation;
         }
 
+        public setDitheringState(value: boolean): void {
+            if (value) {
+                this._gl.enable(this._gl.DITHER);
+            } else {
+                this._gl.disable(this._gl.DITHER);
+            }
+        }
+
         /**
          * stop executing a render loop function and remove it from the execution array
          * @param {Function} [renderFunction] the function to be removed. If not provided all functions will be removed.

+ 1 - 0
tests/validation/validation.js

@@ -222,6 +222,7 @@ canvas = document.createElement("canvas");
 canvas.className = "renderCanvas";
 document.body.appendChild(canvas);
 engine = new BABYLON.Engine(canvas, false);
+engine.setDitheringState(false);
 
 // Loading tests
 var xhr = new XMLHttpRequest();