engine
engine copied to clipboard
Application cannot start in Windows Firefox when antialiasing is enabled, or transparent canvas disabled
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:
Is this FF120? I can't replicate
Interesting, I just suggested PlayCanvas to someone yesterday and he mentioned the same issue, but it worked with WebGL1 for him (Windows + Firefox) :thinking:
I'm on Mac and it seems to work for me. Is this a Window issue perhaps?
I've tried to run under Ubuntu (WSL in Windows) and it runs fine.
OK I can replicate this on Windows FF120. Works in engine 165.5, broken in 1.66.2
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
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.
I suspect that if the multi-sampling was disabled, this would work. WebGL1 does not support multi-sampling, so that explains why it works.
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.
The project runs fine, if Anti-Alias is disabled.
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.
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.
created a Firefox bug report: https://bugzilla.mozilla.org/show_bug.cgi?id=1866762
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.