diff --git a/effects/seriously.blend.js b/effects/seriously.blend.js index a8cd16b..384a4d1 100644 --- a/effects/seriously.blend.js +++ b/effects/seriously.blend.js @@ -97,9 +97,9 @@ if (nativeMode && gl) { topOpts.blendEquation = gl[nativeMode[0]]; topOpts.srcRGB = gl[nativeMode[1]]; - topOpts.destRGB = gl[nativeMode[2]]; + topOpts.dstRGB = gl[nativeMode[2]]; topOpts.srcAlpha = gl[nativeMode[3]]; - topOpts.destAlpha = gl[nativeMode[4]]; + topOpts.dstAlpha = gl[nativeMode[4]]; } } diff --git a/effects/seriously.layers.js b/effects/seriously.layers.js index 6ea50e6..111ee4c 100644 --- a/effects/seriously.layers.js +++ b/effects/seriously.layers.js @@ -150,6 +150,16 @@ }; return { + initialize: function (initialize) { + var gl = this.gl; + initialize(); + + topOpts.blendEquation = gl.FUNC_ADD; + topOpts.srcRGB = gl.SRC_ALPHA; + topOpts.dstRGB = gl.ONE_MINUS_SRC_ALPHA; + topOpts.srcAlpha = gl.SRC_ALPHA; + topOpts.dstAlpha = gl.DST_ALPHA; + }, commonShader: true, shader: function (inputs, shaderSource) { shaderSource.vertex = [ diff --git a/examples/images/monochromebars.png b/examples/images/monochromebars.png index 1600347..d0d8c83 100644 Binary files a/examples/images/monochromebars.png and b/examples/images/monochromebars.png differ diff --git a/seriously.js b/seriously.js index ff7ad70..028a953 100644 --- a/seriously.js +++ b/seriously.js @@ -1159,9 +1159,9 @@ gl.blendFuncSeparate( options && options.srcRGB || gl.ONE, - options && options.dstRGB || gl.ONE_MINUS_SRC_ALPHA, - options && (options.srcAlpha || options.srcRGB) || gl.SRC_ALPHA, - options && (options.dstAlpha || options.dstRGB) || gl.ONE + options && options.dstRGB || gl.ZERO, + options && (options.srcAlpha || options.srcRGB) || gl.ONE, + options && (options.dstAlpha || options.dstRGB) || gl.ZERO ); gl.blendEquation(options && options.blendEquation || gl.FUNC_ADD); } else {