question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multisampled textures not handled at all in PixiJS internally

See original GitHub issue

@ivanpopelyshev When you created multisampled textures with renderbuffers, you introduced an extra step in the render process:

msaaTexture.framebuffer.multisample = 16;

renderer.render(displayObject, msaaTexture);
renderer.framebuffer.blit();

This makes it very problematic to the extent that PixiJS itself fails to take care of this extra step in masking.

No blit here: https://github.com/pixijs/pixi.js/blob/064135e795dbfe7b53248ff457d71cb8536077ac/packages/core/src/mask/StencilSystem.ts#L93

@bigtimebuddy I would propose that we do a blit in renderer#render and save the user all future hassle. What do you think?

Pen 🖊️

Here’s an example that fails with masking (comment out graphics.mask = mask, and it’ll work):

https://codepen.io/sukantpal/pen/abNwBoN

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
GoodBoyDigitalcommented, Sep 14, 2020

both good! no super strong opinion. probably option one! something for next major version?

1reaction
ShukantPalcommented, Sep 12, 2020

We should also create a “renderer.flush” method so users don’t have to both flush the batch renderer and blit the framebuffer after rendering a display-object.

On Sep 12, 2020, at 6:12 AM, Matt Karl <notifications@github.commailto:notifications@github.com> wrote:

I’m in favor of options for render. What do you think about these two signatures?

render(displayObject, options) render(displayObject, renderTexture, options)

Where options is:

  • clear
  • transform
  • skipUpdateTransform
  • blit (proposed)

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/pixijs/pixi.js/issues/6844#issuecomment-691462257, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AFLJDB3SI4HC7NH4VV4UJIDSFNCRTANCNFSM4QOU52EA.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Multisampled textures not handled at all in PixiJS internally
@ivanpopelyshev When you created multisampled textures with renderbuffers, you introduced an extra step in the render process: msaaTexture.
Read more >
PIXI.Sprite - PixiJS API Documentation
The Sprite object is the base for all textured objects that are rendered to the screen. A sprite can be created directly from...
Read more >
PIXI.Renderer
This manages render-textures, which are an abstraction over framebuffers. PIXI.ScissorSystem, This handles scissor masking, and is used internally by MaskSystem.
Read more >
Cannot render to texture with multisampling - Stack Overflow
A framebuffer is considered multisample incomplete by both core and ... of GL_TEXTURE_SAMPLES is the not same for all attached textures; or, ...
Read more >
PixiJS v5 lands - Medium
Best of all, this has resulted in a both builds being smaller with pixi.js clocking in at about 20% smaller than v4! If...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found