Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
brianchirls committed Apr 8, 2014
2 parents 422cc74 + 5a7d1a6 commit 3b39bc0
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions effects/seriously.blend.js
Original file line number Diff line number Diff line change
Expand Up @@ -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]];
}
}

Expand Down
10 changes: 10 additions & 0 deletions effects/seriously.layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down
Binary file modified examples/images/monochromebars.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions seriously.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 3b39bc0

Please sign in to comment.