UnrealEngineHTML5 / Documentation

540 stars 183 forks source link

How to adress most browsers (including Safari) & set build to ES2 / WebGL 1? #80

Open christoph-pieper opened 3 years ago

christoph-pieper commented 3 years ago

Hi! I'm using Unreal Engine 4.22. I have a simple project without any funky features. I want it to be run on as many browser as possible. Especially Safari. In Safari you have to enable ES3 (WegGL 2) over the settings. My targeted usergroup will not get that done. So I have to fallback whats working out-of-the-box (thats very important). How can I compile everything for WebGL 1?

Thank!

kone9 commented 3 years ago

What a good question, it's something I want to know. In my case I set the project to preview in HTML, therefore the project is much better understood. I ran into several problems, especially with shadows and meshes breaking. Look everywhere for this question but there is no information, in the official documentation they give an example of Movile for HTML, however many details like the one you mention are missing. Hopefully someone responds. I would also like info on how to configure the CSS, with some concrete example. Did you find the solution? Screenshot_8 Screenshot_9 Screenshot_11

Screenshot_12

warvstar commented 3 years ago

Doesn't answer your question, but thought I'd mention that webgl2 is enabled in the latest tech preview version of Safari (15), it shouldn't take long for that to land in a stable channel.

kone9 commented 3 years ago

Dispatch me, I make a copy and paste because I wrote it elsewhere. I don't know if you can test it, I would like you to do the direct test on a board that only supports GLES1, you would help me a lot. You just have to change that variable to true.

You can test the exported project in WEBGL1 here. https://kone9.itch.io/prueba-unreal-engine-en-web

Thanks.

Well how the crickets sing around here, in the end it seems that I found the solution, but I don't know if it will be 100% true, I have to verify it, but I already document the information .. The issue is that in the exported files there is a variable that forces the use of WEBGL1, once set to TRUE it is activated and works with webGL1. Screenshot_8

As we see in the console it shows that we are using WEBGL1, I mean ES2

Screenshot_10

This is what it would look like when it works by default with WEBGL 2.0 "ES3"

Screenshot_12

Screenshot_9