Skip to content

Commit f68f454

Browse files
committed
Fix Tiling Sprite mask and filter
1 parent 1711266 commit f68f454

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

src/pixi/extras/TilingSprite.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,21 +197,23 @@ PIXI.TilingSprite.prototype._renderWebGL = function(renderSession)
197197
{
198198
this.children[i]._renderWebGL(renderSession);
199199
}
200-
201-
//renderSession.spriteBatch.stop();
202-
200+
var restartBatch = false;
203201
if (this._filters)
204202
{
203+
restartBatch = true;
204+
renderSession.spriteBatch.stop();
205205
renderSession.filterManager.popFilter();
206206
}
207207

208208
if (this._mask)
209209
{
210+
if (!restartBatch)
211+
renderSession.spriteBatch.stop();
210212
renderSession.maskManager.popMask(this._mask, renderSession);
211213
}
214+
if (restartBatch)
215+
renderSession.spriteBatch.start();
212216

213-
//renderSession.spriteBatch.start();
214-
215217
};
216218

217219
/**

0 commit comments

Comments
 (0)