diff --git a/src/gameobjects/container/ContainerWebGLRenderer.js b/src/gameobjects/container/ContainerWebGLRenderer.js index d25bbe161..a5c6360fe 100644 --- a/src/gameobjects/container/ContainerWebGLRenderer.js +++ b/src/gameobjects/container/ContainerWebGLRenderer.js @@ -75,6 +75,11 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent renderer.setBlendMode(child.blendMode); } + if (child.mask) + { + child.mask.preRenderWebGL(renderer, child, camera); + } + // Set parent values child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY); child.setAlpha(childAlpha * alpha); @@ -85,6 +90,11 @@ var ContainerWebGLRenderer = function (renderer, container, interpolationPercent // Restore original values child.setAlpha(childAlpha); child.setScrollFactor(childScrollFactorX, childScrollFactorY); + + if (child.mask) + { + child.mask.postRenderWebGL(renderer, camera); + } } }; diff --git a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js index bcb65aee4..e88711407 100644 --- a/src/gameobjects/particles/ParticleManagerWebGLRenderer.js +++ b/src/gameobjects/particles/ParticleManagerWebGLRenderer.js @@ -144,7 +144,8 @@ var ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpola if (emitter.mask) { - emitter.mask.postRenderWebGL(renderer); + emitter.mask.postRenderWebGL(renderer, camera); + pipeline.setTexture2D(texture, 0); } } };