Skip to content

Commit 487cedd

Browse files
author
David Gillen
committed
axis inconsistencies in the aberration filter.
1 parent e51a0df commit 487cedd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/easeljs/filters/AberrationFilter.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111

112112
gl.uniform2f(
113113
gl.getUniformLocation(shaderProgram, "uColorDirection"),
114-
this.xDir*(1/stage._viewportWidth), this.yDir*(1/stage._viewportHeight)
114+
this.xDir*(1/stage._viewportWidth), this.yDir*(1/-stage._viewportHeight)
115115
);
116116

117117
gl.uniform3f(
@@ -140,9 +140,9 @@
140140
for (var j=0; j<width; j++) {
141141
pixel = (offset+j)*4;
142142

143-
var redX = j+( (this.xDir*-this.redMultiplier) |0), redY = i+( (this.yDir*this.redMultiplier) |0);
144-
var grnX = j+( (this.xDir*-this.greenMultiplier) |0), grnY = i+( (this.yDir*this.greenMultiplier) |0);
145-
var bluX = j+( (this.xDir*-this.blueMultiplier) |0), bluY = i+( (this.yDir*this.blueMultiplier) |0);
143+
var redX = j+( (this.xDir*-this.redMultiplier) |0), redY = i+( (this.yDir*-this.redMultiplier) |0);
144+
var grnX = j+( (this.xDir*-this.greenMultiplier) |0), grnY = i+( (this.yDir*-this.greenMultiplier) |0);
145+
var bluX = j+( (this.xDir*-this.blueMultiplier) |0), bluY = i+( (this.yDir*-this.blueMultiplier) |0);
146146

147147
if (redX < 0) { redX = 0; }
148148
if (redX >= width) { redX = width-1; }

0 commit comments

Comments
 (0)