Fixed the Tunnel filter. Had to patch Pixi to do it :( But no other choice for now until they merge my pull request.

This commit is contained in:
photonstorm 2014-02-27 23:28:28 +00:00
parent 3568dc4ff1
commit 43cd5e4b3f
3 changed files with 4 additions and 3 deletions

View file

@ -35,6 +35,6 @@ function update() {
filter.update();
// Uncomment for coolness :)
filter.origin = filter.origin + 0.001;
// filter.origin = filter.origin + 0.001;
}

View file

@ -42,6 +42,8 @@ Phaser.Filter.Tunnel.prototype.init = function (width, height, texture) {
this.setResolution(width, height);
this.uniforms.iChannel0.value = texture;
texture.baseTexture._powerOf2 = true;
}
Object.defineProperty(Phaser.Filter.Tunnel.prototype, 'alpha', {

View file

@ -185,7 +185,7 @@ PIXI.PixiShader.prototype.initSampler2D = function(uniform)
var gl = this.gl;
gl.activeTexture(gl['TEXTURE' + this.textureCount]);
gl.bindTexture(gl.TEXTURE_2D, uniform.value.baseTexture._glTexture);
gl.bindTexture(gl.TEXTURE_2D, uniform.value.baseTexture._glTextures[gl.id]);
// Extended texture data
if (uniform.textureData)
@ -259,7 +259,6 @@ PIXI.PixiShader.prototype.syncUniforms = function()
// This would probably be faster in an array and it would guarantee key order
for (var key in this.uniforms)
{
uniform = this.uniforms[key];
if (uniform.glValueLength === 1)