pixijs / layers

Separate the z-hierarchy of your scene tree from its canonical structure.
https://pixijs.io/layers/docs/
MIT License
223 stars 57 forks source link

Add support for multisampled render textures #67

Closed dev7355608 closed 3 years ago

dev7355608 commented 3 years ago

This change makes it possible to enable multisampling; it works with and without double buffering.

const layer = new PIXI.display.Layer();
layer.useRenderTexture = true;
layer.useDoubleBuffer = true;

const renderTexture = layer.getRenderTexture();
renderTexture.framebuffer.multisample = PIXI.MSAA_QUALITY.HIGH;

const layerSprite = new PIXI.Sprite(renderTexture);

// ...
ivanpopelyshev commented 3 years ago

good idea! though i dont remember whether double buffering works now, but blit there is good.