phaserjs / phaser

Phaser is a fun, free and fast 2D game framework for making HTML5 games for desktop and mobile web browsers, supporting Canvas and WebGL rendering.
https://phaser.io
MIT License
37.22k stars 7.1k forks source link

Effects in PreFX on mobile have a strange green tint #6466

Closed ClaudiaFoglieni closed 9 months ago

ClaudiaFoglieni commented 1 year ago

Version

Description

Using the examples found on Phaser Labs ( https://labs.phaser.io/index.html?dir=3.60/fx/&q= ) for the beta versione 3.60 on a mobile browser, all the codes presents in the FX folder are showing a green tint on the screen. The same code on mobile are working correctly. I have tried also the compare version, checking from version 3.60 beta 19 to the dev one, and the issue is still present.

Example Test Code

You can test these two examples:

Additional Information

These are the screenshots from Firefox mobile browser: Screenshot_20230411_092339_Firefox Screenshot_20230411_092253_Firefox

photonstorm commented 1 year ago

Very strange - I've tested this on Android without seeing it before.

Here's a video of a Samsung Galaxy S23 (Android v13) running Firefox:

https://user-images.githubusercontent.com/164476/231182829-264b2655-2e35-4c42-97fc-10619af7a394.mp4

Does anyone else see this? Perhaps it's device specific?

ClaudiaFoglieni commented 1 year ago

I have tested these devices after your input and the green tint is present:

A difference that I have found is about the supported extensions inside the WebGLRenderer:

spayton commented 1 year ago

I've also seen seen this on the built in FX.

A quick play on browserstack confirms @ClaudiaFoglieni device/version list. It also does it on these fx: barrel, pixelate, colormatrix, shadow, vignette, wipe.

photonstorm commented 1 year ago

Thanks for confirming both. So yeah, it's device specific (rather than browser version specific, I think).

I'll have a look. It's likely something simple in the shader that I'm assuming it supports but clearly doesn't.

wayfu commented 1 year ago

I've had reports from friends who use linux on the desktop with similar behavior (which, lacking linux, I cannot test). As soon as I attached PreFX Glows to objects, they would turn blue or black for them in Firefox.

tasmanavt commented 1 year ago

I have the same problem. I have encountered this kind of browser on android. But when I updated the browser the problem disappeared. Can you please tell me what it is and how to avoid it? Screenshot_20231113-155731_Samsung Internet Screenshot_20231113-160854_Samsung Internet

photonstorm commented 9 months ago

Hiya - sorry we took a while to get to this, but we've tested it extensively under v3.80 and cannot replicate this issue any more, over a wide range of hardware. It's possibly because of the highp precision 3.60 beta used, or maybe that old version of Chrome had an issue? But we've tested modern Android chrome widely and are confident this is resolved now.

p4dd9 commented 3 weeks ago

Hi, using Phaser 3.85.2 using preFX with shadow results on modern chrome browser and brave browser using chromium with the same tint?-issue on the following devices:

It also affects ImageObjects that use a spritesheet frame to expose the full spritesheet instead of the selected frame. image

Codesnippet: this.img.preFX?.addShadow(-2, -4, 0.05, 1, 0x000000, 3)

p4dd9 commented 3 weeks ago

Might relate to https://github.com/phaserjs/phaser/issues/6926

photonstorm commented 3 weeks ago

Yeah it's the same as #6926 and is fixed in v4.0.0 but if we get time, we'll see if there's an easy fix for 3.87. It's very, very device + OS + browser specific, it's not a case of 'everything does it' (because that would be easy to fix!)