Closed KinkGD closed 4 months ago
If the game freeze, might be either because of a crash related to the Pixi Filter - but I assumed that Pixi was just ignoring the filter when it's in canvas mode - or in the GD game engine because we assume a filter exists while it's not the case or something like this.
In any case, it should not freeze/crash the game. Would be great to see if you can have the webview console logs - it would show immediately the problem. Not sure exactly how to do it though, especially if the webview is not based on Chrome and is old.
Another option for debugging can be to force canvas rendering on desktop and see if it crash.
What I noticed is that the problem is only in the webview. By testing with the wifi preview, we have the effect, but it's ultra slow. The device seems to be poorly optimized for shaders.
There might be a difference according to the browser. Android 4.x devices webviews are based on the slow and non webgl capable old internal browser, even if they have Chrome. If you're running a wifi preview with Chrome, it might be slow because the device won't have a GPU fast enough for rendering the shader, but at least Chrome will render with WebGL and not canvas.
Apk tested on android 9 : same issue
What if you replace blur by another effect? I tried sepia and it worked on a Android 6 (both preview on wifi in a browser and in an apk)
Bumping this as I used the blur effect in my game, and that part of the game is unplayable on mobile, the game renders at 3 FPS on Firefox (blurs works). The game is smooth on Chrome, but the blurred layer is just a big greenish rectangle. On computer, it's smooth. The pixelate effect works perfectly in the same project. Even changing the value every frame doesn't make it lag. I'm on Oreo.
Workaround: use the kawase blur, it works fine. I suggest we rename Kawase blur to Blur and remove the original Blur. 😁
Not all effects are equally performant indeed. We should surely flag the Blur or hide it, or at least show a warning.
Problem doesn't occur since PixiJS updates, and a hightlight on a cheaper blur in the effects list.
Describe the bug
The new Layer effects aren't working on android : I used at start a layer a effect (blur) and modified the blur parameter in a scene : the effect works perfectly smooth on desktop version of the game, but not android : it just makes the game freeze.
So i can report the bug occures in two scenarios on android : 1) Layer effect "blur) + effect modifiation through events : the scene freeze 2) Just the "blur" effect, without event modification of the the effect parameters Both scenario => freeze. It seems the webGL effect just cannot be rendered on android (webview/canva).
To Reproduce
Here a source file of the platformer example with scenario 1 events : LayerEffectTrouble.zip
Solutions ?
Disable everything related to these effects on Android ? At least the possibility of disabling the effects on Mobile through event would be great for people like me who develop a single project for both desktop and mobile (right now, i have to remove the effect totally because of this android issue).
Other details
GD5b80 - tested on android 6/7/8