Exporting to HTML5 and WebGL

I’m not a game developer but a web developer looking to consume UE4 games in web pages.

It appears that UE 4.22 exports to HTML targeting WebGL 2.0 specifically.

WebGL 2.0 is not well supported by all mainstream browsers, as outlined here: Can I use... Support tables for HTML5, CSS3, etc.

My question is, is it possible to export games to HTML5 using WebGL 1.0 rather than WebGL 2.0? If this is possible, how is this exporting controlled? Via a specific UE setting or configuration option?

Thanks, friends. :slight_smile:

1 Like

Hi, did you manage to get a solution?

Did you find anything haha

Note: All testing is done on latest version of binary engine’s listed below.

UE4.17 - (webgl 1.0 bool in html5 packaging options) however I’ve yet to get beyond asm.js callstack issues for iOS when running any engine build using asm.js.

UE4.18 - Both webgl 1.0 & wasm support.

  • WebGL 1 - IOs safari results in Expression (inTexture !=nullptr) failed.
    UPDATE (WebGL 1) Based on 4.19 testing maybe try disabling HUD or any Touch UI??
  • WebGL 2 - Value_GL_Max_Color_Attachments >= MaxSimulataneousRenderTargets error
  • The above errors may be due to the crosshair or HUD display for the mobile controller requiring too many rendertargets?? Will test packaging without HUD or Mobile overlay.
  • Desktop runs fine under both conditions.

UE4.19 - Both webgl 1.0 and wasm support. BEST RESULTS/HOPE FOR SOURCE EDITS

  • Same errors as 4.18 on IOS initially
  • Disabled HUD/Touch Overlay with webgl 1.0 (results in black (lit shaded) textures) RUNS!
  • WebGL 1.0 on IOS/Android would be possible with a build that uses only base color mats.
  • WebGL 1.0 on IOS/Android may be possible with 100% unlit shaders (externally baked)?
  • UI elements would need to be completely on the web layer UI/HUD not supported!?
  • Disabled HUD and Touch Overlay webgl 2 (ios rendertarget error as in UE4.18)

UE4.20 - Dropped Support for WebGL 1.0, Only WebGL 2 WASM

  • Fails to package

UE4.21 - Coming Soon!

UE4.23 - WebGL 2 only (ES3.1) WASM. HAS POTENTIAL DUE TO BEING MORE RECENT
BEST DESKTOP OPTION

  • Webgl 2 - IOS safari results in black (lit mat) textures and texture compression warning.
  • IOS/Android may be possible as in 4.19 with unlit shaders or base color mats?
  • Need to test TouchOverlay/HUD elements
2 Likes