md_lasalle Posted August 11, 2017 Share Posted August 11, 2017 Hey everyone, I was looking at the documentation on BLEND_MODES and noticed there was actually no way to disable blending, equivalent of calling glDisable(GL_BLEND) on Desktop and ES OpenGL. On native mobile it increases performance when rendering fullscreen background images that do not need to blend (ie. they have no transparency in the image). Is there another way of achieving this I'm not aware of ? Thank you. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 11, 2017 Share Posted August 11, 2017 There's no "NO_BLEND" mode in v4, however saw that in next big version (v5) it will be there. You can hack sprite renderer and also WebGLState class, either from outside. either bulid your own pixijs version. Quote Link to comment Share on other sites More sharing options...
md_lasalle Posted August 11, 2017 Author Share Posted August 11, 2017 Ok that's good to know, I'm using Pixi through Phaser, so hopefully they will adopt v5 soon after its release. Thank you Ivan for your reply. Quote Link to comment Share on other sites More sharing options...
xerver Posted August 11, 2017 Share Posted August 11, 2017 3 hours ago, md_lasalle said: Ok that's good to know, I'm using Pixi through Phaser, so hopefully they will adopt v5 soon after its release. Thank you Ivan for your reply. I think Phaser 2 uses pixi v3, and Phaser 3 doesn't use pixi at all. Quote Link to comment Share on other sites More sharing options...
md_lasalle Posted August 14, 2017 Author Share Posted August 14, 2017 On 8/11/2017 at 3:06 PM, xerver said: I think Phaser 2 uses pixi v3, and Phaser 3 doesn't use pixi at all. Oh, that's good to know, gonna try and hack the pixi source to enable this. Thanks. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 14, 2017 Share Posted August 14, 2017 Yep, just make a blendmode that will be handled in WebGLState sepoarately, by disabling "gl.BLEND" I did something like that before, it worked. Its possible that you dont even have to reuilbd pixi, just hack the WebGLState class methods. Quote Link to comment Share on other sites More sharing options...
md_lasalle Posted August 14, 2017 Author Share Posted August 14, 2017 Have you noticed any gain in performance? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted August 14, 2017 Share Posted August 14, 2017 I dont have mobile devices, except firefoxOS Keon and Flame. :( 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.