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

Update web demo exports for Godot 4.3 #1127

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Oct 29, 2024

This comes with other improvements:

  • Demos now work on desktop and mobile browsers, as ETC2 import is now automatically enabled before exporting each demo.
  • Progressive web app is available for each project.
    • Can be added to the home screen on a device for a closer-to-native experience.
    • Cross-origin isolation headers are automatically added, so that the export works with threads enabled despite being hosted on GitHub Pages (which doesn't send these headers).

Several demos will need further tweaks to look better when using the Compatibility rendering method. Currently, many 3D demos appear too bright due to lights with shadows enabled using sRGB blending.

Also, many demos will need to be modified to indicate which parts of them are not supported when running on the web platform, or when using the Compatibility rendering method. I'll open a separate PR to handle this.

Try the demos with this link: https://calinou.github.io/godot-demo-projects/

This comes with other improvements:

- Demos now work on desktop and mobile browsers, as ETC2 import is now
  automatically enabled before exporting each demo.
- Progressive web app is available for each project.
  - Can be added to the home screen on a device for a closer-to-native experience.
  - Cross-origin isolation headers are automatically added, so that the export
    works with threads enabled despite being hosted on GitHub Pages
    (which doesn't send these headers).

Several demos will need further tweaks to look better when using
the Compatibility rendering method. Currently, many 3D demos appear
too bright due to lights with shadows enabled using sRGB blending.

Also, many demos will need to be modified to indicate which parts
of them are not supported when running on the web platform, or
when using the Compatibility rendering method.
Copy link
Member

@fire fire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I randomly selected a few to test the web demos and they seemed to run on macos firefox.

Did not test support on the phones but need help.

The builds play so cross origin is working.

@Calinou Do you think we should yolo merge it or test each by each with a matrix?

@shahriarlabib000
Copy link
Contributor

shahriarlabib000 commented Oct 29, 2024

I think 3d/material_testers uses Forward+ renderer. Tested on an Android device. Was stuck in the loading process for a long time, lost my patience.
Everything thing else seems to atleast run. Couldn't properly test every project cause they don't have support for touch screen yet

@Calinou
Copy link
Member Author

Calinou commented Oct 30, 2024

I think 3d/material_testers uses Forward+ renderer. Tested on an Android device. Was stuck in the loading process for a long time, lost my patience.

Compatibility is always used on the web platform, as web browsers don't support Vulkan. Godot doesn't support WebGPU yet, which would be required to support Forward+/Mobile on the web platform.

If the demo takes a long time to load on a mobile device, it's likely because the demo is quite demanding on top of running on a slow device with significant overhead from WebAssembly. The PCK's filesize is almost 100 MB after all due to all the panorama images, even after being downsized to ~67% on each axis.

@Calinou Calinou merged commit 7ed5b1c into godotengine:master Oct 30, 2024
1 check passed
@Calinou Calinou deleted the fix-web-demos branch October 30, 2024 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Web demos are broken
4 participants