Alex Tappin Posted June 3, 2016 Author Share Posted June 3, 2016 1 minute ago, ivan.popelyshev said: Power of two is about better scaling, not performance. I think your problem is that fragment (pixel) shader is called too many times, its not about multitextures, its about area you are trying to fill with textures. I dont know what to do about that. I have lower-end device, i'll try it. Okay give it a shot. Let me know what you discover. On a few of the devices I have tested it on, the higher ends seemed to yield great results. About the fragment shader being called too many times... Are there any known workarounds? Any other way I can implement this project using PIXI? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 3, 2016 Share Posted June 3, 2016 10 minutes ago, Alex Tappin said: Okay give it a shot. Let me know what you discover. On a few of the devices I have tested it on, the higher ends seemed to yield great results. About the fragment shader being called too many times... Are there any known workarounds? Any other way I can implement this project using PIXI? What did you use to create APK file? Quote Link to comment Share on other sites More sharing options...
Alex Tappin Posted June 3, 2016 Author Share Posted June 3, 2016 5 minutes ago, ivan.popelyshev said: What did you use to create APK file? Intel XDK with crosswalk. I have tried with "upgrading" it to a cordova app in the intel xdk. Both crosswalk 16 and 17. Same results for everything. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 3, 2016 Share Posted June 3, 2016 I dont know. may be it eats too much memory? You can pre-bind() all textures //atlas1 is basetexture //pixi v3 renderer.updateTexture(atlas1); //pixi v4 renderer.textureManager.updateTexture(atlas1); And then free actual source: atlas1.source = null; Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 3, 2016 Share Posted June 3, 2016 And yes, try power of two textures, may be it will give something. Just specify "power-of-two" in your texture packer. Also may be "trim" option of texture packer will give you a bit too. Quote Link to comment Share on other sites More sharing options...
Alex Tappin Posted June 5, 2016 Author Share Posted June 5, 2016 On 6/3/2016 at 4:03 PM, ivan.popelyshev said: And yes, try power of two textures, may be it will give something. Just specify "power-of-two" in your texture packer. Also may be "trim" option of texture packer will give you a bit too. I have thought of a potential update that may or may not work. Currently, I have many tiling Sprite objects and sprite objects for the parallax. With this, I need to call update on each one. My solution... would having one sprite container, with many children work better? In one sprite named "parallax" I would add multiple children to that sprite. So I would have to update sprite.children[x] using a for loop. It will be some work to test it out... would this possibly render some better results? Constantly thinking of ways to better it. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted June 5, 2016 Share Posted June 5, 2016 1 hour ago, Alex Tappin said: I have thought of a potential update that may or may not work. Currently, I have many tiling Sprite objects and sprite objects for the parallax. With this, I need to call update on each one. My solution... would having one sprite container, with many children work better? In one sprite named "parallax" I would add multiple children to that sprite. So I would have to update sprite.children[x] using a for loop. It will be some work to test it out... would this possibly render some better results? Constantly thinking of ways to better it. I dont think that its a problem. You need to profile it on low-end devices. Connect adb and all that stuff. 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.