Yusef Posted February 28, 2020 Share Posted February 28, 2020 (edited) Hi, Why when using cacheAsBitmap , antialias stops working? For example, if we add graphics.cacheAsBitmap=true; to https://pixijs.io/examples/index.html?s=demos#/graphics/simple.js , antialias seems to stops working. Thanks! Edited February 28, 2020 by Yusef Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 28, 2020 Share Posted February 28, 2020 (edited) Hello and Welcome to the forums! This issue is based on webgl limitations. There's no antialias in custom framebuffers. For more information, search "antialias" both in this subforum and in pixijs issues: https://github.com/pixijs/pixi.js/issues?utf8=✓&q=is%3Aissue You can find out how other people worked around it. Antialias for framebuffers exists in webgl2 and you can try to use it in latest pixi dev version. For more details on that you can read https://github.com/pixijs/pixi.js/pull/6296 , but its an experimental feature and you better be able to hack cacheAsBitmap yourself. Edited February 28, 2020 by ivan.popelyshev Yusef 1 Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 28, 2020 Share Posted February 28, 2020 (edited) Alternatively: hack cacheAsBitmap that way it uses resolution:2 or 3 . Here's example of hack, I just CTRL+Ced some code from cacheAsBitmap and changed it to check if it fixes a bug: https://www.pixiplayground.com/#/edit/CGFVg3fv6Rx_4nxcZS2yS Edited February 28, 2020 by ivan.popelyshev Yusef 1 Quote Link to comment Share on other sites More sharing options...
Yusef Posted February 28, 2020 Author Share Posted February 28, 2020 Thank you very much! ivan.popelyshev 1 Quote Link to comment Share on other sites More sharing options...
michaeljohansen Posted May 20, 2020 Share Posted May 20, 2020 On 2/28/2020 at 1:09 PM, ivan.popelyshev said: Alternatively: hack cacheAsBitmap that way it uses resolution:2 or 3 . Here's example of hack, I just CTRL+Ced some code from cacheAsBitmap and changed it to check if it fixes a bug: https://www.pixiplayground.com/#/edit/CGFVg3fv6Rx_4nxcZS2yS I've read the _initCachedDisplayObject function several times to try to figure out where to add a resolution property. Where would you do that? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.