Jump to content

Sprite's mask does not applied when render into RenderTexture


Recommended Posts


I noticed that sprite masking does not work when the sprite is rendered into RenderTexture - here is jsfiddle which demonstrates it: https://jsfiddle.net/GRaAL/tt4bgppf/ (I'm using WebGL renderer).

I've tried to dive into Phaser code, but didn't found a reason. I see that the same DisplayObject._renderWebGL used in both cases - when rendered to screen or into framebuffer (RenderTexture) - and in both cases stencilManager is called with valid mask. Unfortunately I'm not so good in WebGL to understand what is wrong here.

I found an old issue in pixi itself about that (https://github.com/pixijs/pixi.js/issues/694), but I'm not sure which pixi's version is used in Phaser.


Could you please advice how can I make it work (and is it possible)?


Link to comment
Share on other sites

  • 3 weeks later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...