Update RenderWebGL.js

This commit is contained in:
peabrainiac 2019-03-02 22:35:42 +01:00 committed by GitHub
parent 7628c1e7f9
commit 61bf4c84c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1621,7 +1621,8 @@ class RenderWebGL extends EventEmitter {
twgl.setUniforms(currentShader, uniforms);
gl.blendFuncSeparate(gl.ONE,gl.ONE_MINUS_SRC_ALPHA,gl.ONE,gl.ONE_MINUS_SRC_ALPHA);
/* set blend function to work with premultiplied alpha */
gl.blendFuncSeparate(gl.ONE, gl.ONE_MINUS_SRC_ALPHA, gl.ONE, gl.ONE_MINUS_SRC_ALPHA);
twgl.drawBufferInfo(gl, this._bufferInfo, gl.TRIANGLES);
}