Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Application cannot start in Windows Firefox when antialiasing is enabled, or transparent canvas disabled #5856

Open
LeXXik opened this issue Nov 27, 2023 · 14 comments
Assignees
Labels
area: graphics Graphics related issue bug

Comments

@LeXXik
Copy link
Contributor

LeXXik commented Nov 27, 2023

Forum:
https://forum.playcanvas.com/t/back-screen-in-latest-firefox-version-120-0-playcanvas-version-166-3/33964/1
https://forum.playcanvas.com/t/camera-blackscreen-with-the-latest-firefox-version-120-0/33986/1

Repro: https://playcanvas.com/project/1167343/overview/roll-a-ball

The project is a new default one from Roll a Ball template. Launch a game in latest Firefox. A black screen is shown.

Console:
image

@marklundin
Copy link
Member

Is this FF120? I can't replicate

@LeXXik
Copy link
Contributor Author

LeXXik commented Nov 27, 2023

image

@kungfooman
Copy link
Collaborator

kungfooman commented Nov 27, 2023

Interesting, I just suggested PlayCanvas to someone yesterday and he mentioned the same issue, but it worked with WebGL1 for him (Windows + Firefox) 🤔

@mvaligursky
Copy link
Contributor

I'm on Mac and it seems to work for me. Is this a Window issue perhaps?

Screenshot 2023-11-27 at 10 43 00

@LeXXik
Copy link
Contributor Author

LeXXik commented Nov 27, 2023

I've tried to run under Ubuntu (WSL in Windows) and it runs fine.

@marklundin
Copy link
Member

OK I can replicate this on Windows FF120. Works in engine 165.5, broken in 1.66.2

@LeXXik
Copy link
Contributor Author

LeXXik commented Nov 27, 2023

Engine examples work fine, except these (black screen as well):
positional
mini stats
obj
video texture
transform feedback
point cloud
point cloud simulation
particles snow / random sprites / anim index
paint mesh
orbit
fly
first person

These take very long time to load:
shader compile
lights physical units

@mvaligursky
Copy link
Contributor

mvaligursky commented Nov 27, 2023

I can repro on Windows as well, Firefox 120. I captured this in Spector, and under the hood rendering seems ok to a multi-sampled buffer. At the very end, we resolve this multi-sampled buffer to a single sampled default backbuffer (NULL), maybe that does not work for some reason in FF on Windows. API calls to do it seem correct to me.

Screenshot 2023-11-27 at 11 01 55

I suspect that if the multi-sampling was disabled, this would work. WebGL1 does not support multi-sampling, so that explains why it works.

@mvaligursky
Copy link
Contributor

These take very long time to load:
shader compile
lights physical units

Yes, the first one is compiling many large shaders, and is expected to take longer on Windows (where DX shader compiler is very slow). This is a banchmark for it really.

The second one has many complex shaders, and so suffers from the same.

Known issue without a solution at the moment. Shared by all WebGL implementations.

@LeXXik
Copy link
Contributor Author

LeXXik commented Nov 27, 2023

The project runs fine, if Anti-Alias is disabled.

@mvaligursky
Copy link
Contributor

Engine examples work fine, except these (black screen as well):
positional
mini stats
obj
video texture
transform feedback
point cloud
point cloud simulation
particles snow / random sprites / anim index
paint mesh
orbit
fly
first person

Interesting that I think all these examples that do not work use new pc.Application and not new pc.AppBase that's used by the working examples. Launcher uses new pc.AppBase though I believe.

@mvaligursky
Copy link
Contributor

Latest Firefox beta in Window: 121.0b3 (64-bit) has the same issue.
Also, when I enabled transparent canvas, all works.
So it seems to me that Firefox seems to have a problem resolving RGB8 multi-sampled surface to a default framebuffer.
Rendering to RGB8 multisamplewd texture (RenderToTexture examples does it) seems to work fine.

@mvaligursky
Copy link
Contributor

created a Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1866762

@mvaligursky mvaligursky self-assigned this Nov 27, 2023
@mvaligursky mvaligursky added bug area: graphics Graphics related issue labels Nov 27, 2023
@mvaligursky mvaligursky changed the title Application cannot start in Firefox Application cannot start in Windows Firefox when antialiasing is enabled, or transparent canvas disabled Nov 27, 2023
@mvaligursky
Copy link
Contributor

The workaround has been released as part of https://github.com/playcanvas/engine/releases/tag/v1.67.1

I'll leave the issue opened to keep an eye on possible Firefox fix, allowing us to enable AA on newer versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

No branches or pull requests

4 participants