Browse Source

fix: remove useless blend

hujinliang 5 years ago
parent
commit
7dff114359
3 changed files with 4 additions and 4 deletions
  1. 2 2
      web/dist/vap.js
  2. 0 0
      web/dist/vap.min.js
  3. 2 2
      web/src/webgl-render-vap.ts

+ 2 - 2
web/dist/vap.js

@@ -1655,8 +1655,8 @@
 
 
         if (!gl) {
         if (!gl) {
           this.instance.gl = gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
           this.instance.gl = gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
-          gl.enable(gl.BLEND);
-          gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
+          gl.disable(gl.BLEND);
+          gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
           gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
           gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
         } // 清除界面,解决同类型type切换MP4时,第一帧是上一个mp4最后一帧的问题
         } // 清除界面,解决同类型type切换MP4时,第一帧是上一个mp4最后一帧的问题
 
 

File diff suppressed because it is too large
+ 0 - 0
web/dist/vap.min.js


+ 2 - 2
web/src/webgl-render-vap.ts

@@ -89,8 +89,8 @@ export default class WebglRenderVap extends VapVideo {
     }
     }
     if (!gl) {
     if (!gl) {
       this.instance.gl = gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
       this.instance.gl = gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
-      gl.enable(gl.BLEND);
-      gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
+      gl.disable(gl.BLEND);
+      gl.blendFuncSeparate(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA, gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
       gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
       gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);
     }
     }
 
 

Some files were not shown because too many files changed in this diff