Jump to content

PixiJS mask is causing missing pixels


Elliot Koh
 Share

Recommended Posts

I'm pretty sure my lack of knowledge is resulting in the current behaviour, but I'm not quite sure where the issue lies. I have set it up such:
 

const pixiRegion = new PIXI.Container();
  const waveformGeometry = new PIXI.Geometry();

  const waveform = new PIXI.Mesh(
    waveformGeometry,
    makePixiShader(),
    void 0,
    PIXI.DRAW_MODES.TRIANGLES
  );

  waveform.name = 'waveform';

  pixiRegion.addChild(waveform);
  const mask = new PIXI.Sprite(PIXI.Texture.WHITE);
  mask.name = 'mask';
  pixiRegion.addChild(mask);
  pixiRegion.mask = mask;

 

But somehow the scale of the mask is having some interactions with the way the end result is finally rendered. It looks like some pixels are being dropped of sorts. The triangles I'm drawing are really small, so maybe it could be related to that? But turning the mask off resolves the problem. 

 

 

 

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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