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

Fix error in Web builds that resulting in 2D objects not drawing in the GLES3 backend #67402

Merged
merged 1 commit into from Oct 15, 2022

Conversation

clayjohn
Copy link
Member

Fixes: #67392

The issue came from not binding a light UBO when using the DISABLE_LIGHTING code path

I also removed the glClientWaitSync call as it was resulting in an error as well.

objects not drawing in the GLES3 backend.

Issue came from not binding a light UBO when using the DISABLE_LIGHTING
code path
@akien-mga akien-mga merged commit f3428f7 into godotengine:master Oct 15, 2022
@akien-mga
Copy link
Member

Thanks!

@AntonioDell
Copy link
Contributor

AntonioDell commented Oct 22, 2022

Does this commit really solve the issue? I checked out the current master branch (276ab5b), build the editor and the web export template from it and tried to export a minimal project to web.
When running it in the editors HTML server or with a custom vite setup (to set the necessary security headers for SharedArrayBuffer) it seems to have the same issues as before.
Only a grey screen is shown.

Minimal project
grey_screen_issue_test.zip
(EDIT: The "Rendering method" in project setting wasn't set to gl_compatibility, but after changing it, it still doesn't work)

Steps to reproduce

  1. Build the godot editor from the latest master branch (scons platform=linuxbsd target=editor -j10 tools=yes )
  2. (Not sure if necessary to run the web project)
    2.1 Build the web export template from the latest master branch (scons platform=web tools=no target=template_debug)
    2.2 Move the web export template to ~/.locale/share/godot/export_templates/4.0.beta/web_debug.zip
  3. Open the project with the the custom godot editor build
  4. Run the web project in browser (I use the latest Firefox) with:
    image

Result
image

Expected Result
image

EDIT: Changed release web export build to debug.

@zaevi
Copy link
Contributor

zaevi commented Oct 22, 2022

@AntonioDell It actually fixed the issue.
image

I saw you just compiled a release template. Try debug template again.

@clayjohn
Copy link
Member Author

Yep, MRP working for me too on master

Screenshot from 2022-10-22 01-34-06

@AntonioDell
Copy link
Contributor

AntonioDell commented Oct 22, 2022

I will try again, thanks for the feedback!

@AntonioDell
Copy link
Contributor

AntonioDell commented Oct 23, 2022

@clayjohn Sorry to bother you, but I cannot seem to get it working.
I built the editor + debug template from your commit, went through the following steps:

  1. Build the godot editor from the latest master branch (scons platform=linuxbsd target=editor -j10 tools=yes )
    1, Build the web export template from the latest master branch (scons platform=web tools=no target=template_debug)
  2. Move the web export template to ~/.locale/share/godot/export_templates/4.0.beta/web_debug.zip
  3. Open the project with the the custom godot editor build
  4. Create a web export
  5. Run the web project in browser (I use the latest Firefox)

But the result is the same. Did I miss a step?
I even tried selecting the debug export template in the "custom_template/debug" export setting.
This issue is currently stopping me from deploying a new version of my current pet project, which is really annoying, so any help would be much appreciated :)

@zaevi I noticed that too, tried again with a debug template and edited my comment. But sadly I couldn't make it work.

@clayjohn
Copy link
Member Author

@AntonioDell do you get any errors reported in the console?

@AntonioDell
Copy link
Contributor

AntonioDell commented Oct 23, 2022

@clayjohn Thank you for your time!
In firefox I get the following messages:
image

EDIT: In chrome it works!! Just tried it and it works! Strange that firefox doesn't though... Maybe there are some different preferences set regarding webgl? I will investigate this.

@Sauermann
Copy link
Contributor

I can confirm the problem, that some Firefox-versions do not display the content correctly.
On Windows with Firefox 106.0.2 I get the error/warning messages of the previous post, but the content is displayed correctly.

On Debian 11 with Firefox 91.13.0esr I also get the Blocking on the main thread is very dangerous, see https://emscripten.org/docs/porting/pthreads.html#blocking-on-the-main-browser-thread message, and the content is not displayed correctly. Other things like InputEvents work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Web] 2D doesn't work on Web.
5 participants