Browse Source

Porter duff premul

Sebastien Vandenberghe 8 years ago
parent
commit
7e390de3b9

File diff suppressed because it is too large
+ 471 - 460
dist/preview release/customConfigurations/minimalViewer/babylon.d.ts


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


File diff suppressed because it is too large
+ 62 - 38
dist/preview release/customConfigurations/minimalViewer/babylon.max.js


File diff suppressed because it is too large
+ 471 - 460
dist/preview release/customConfigurations/minimalViewer/babylon.module.d.ts


+ 9 - 0
src/babylon.engine.ts

@@ -245,6 +245,7 @@
         private static _ALPHA_MAXIMIZED = 5;
         private static _ALPHA_MAXIMIZED = 5;
         private static _ALPHA_ONEONE = 6;
         private static _ALPHA_ONEONE = 6;
         private static _ALPHA_PREMULTIPLIED = 7;
         private static _ALPHA_PREMULTIPLIED = 7;
+        private static _ALPHA_PREMULTIPLIED_PORTERDUFF = 8;
 
 
         private static _DELAYLOADSTATE_NONE = 0;
         private static _DELAYLOADSTATE_NONE = 0;
         private static _DELAYLOADSTATE_LOADED = 1;
         private static _DELAYLOADSTATE_LOADED = 1;
@@ -376,6 +377,10 @@
             return Engine._ALPHA_PREMULTIPLIED;
             return Engine._ALPHA_PREMULTIPLIED;
         }
         }
 
 
+        public static get ALPHA_PREMULTIPLIED_PORTERDUFF(): number {
+            return Engine._ALPHA_PREMULTIPLIED_PORTERDUFF;
+        }
+
         public static get DELAYLOADSTATE_NONE(): number {
         public static get DELAYLOADSTATE_NONE(): number {
             return Engine._DELAYLOADSTATE_NONE;
             return Engine._DELAYLOADSTATE_NONE;
         }
         }
@@ -2167,6 +2172,10 @@
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);
                     this._alphaState.alphaBlend = true;
                     this._alphaState.alphaBlend = true;
                     break;
                     break;
+                case Engine.ALPHA_PREMULTIPLIED_PORTERDUFF:
+                    this._alphaState.setAlphaBlendFunctionParameters(this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE_MINUS_SRC_ALPHA);
+                    this._alphaState.alphaBlend = true;
+                    break;
                 case Engine.ALPHA_COMBINE:
                 case Engine.ALPHA_COMBINE:
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);
                     this._alphaState.setAlphaBlendFunctionParameters(this._gl.SRC_ALPHA, this._gl.ONE_MINUS_SRC_ALPHA, this._gl.ONE, this._gl.ONE);
                     this._alphaState.alphaBlend = true;
                     this._alphaState.alphaBlend = true;