Fixed bug where filters could not be shared between multiple renderers

This commit is contained in:
Mat Groves 2014-01-01 20:14:13 +00:00
parent 72ba698851
commit 5774bbd1d5
3 changed files with 8 additions and 6 deletions

View file

@ -6085,7 +6085,7 @@ PIXI.WebGLFilterManager.prototype.applyFilterPass = function(filter, filterArea,
{
// use program
var gl = this.gl;
var shader = filter.shader;
var shader = filter.shaders[gl.id];
if(!shader)
{
@ -6095,7 +6095,7 @@ PIXI.WebGLFilterManager.prototype.applyFilterPass = function(filter, filterArea,
shader.uniforms = filter.uniforms;
shader.init();
filter.shader = shader;
filter.shaders[gl.id] = shader;
}
// set the shader
@ -11077,7 +11077,8 @@ PIXI.AbstractFilter = function(fragmentSrc, uniforms)
*/
this.passes = [this];
this.shaders = [];
this.dirty = true;
this.padding = 0;