Search Unity

WebGL Roadmap

Discussion in 'Web' started by jonas-echterhoff, Jun 18, 2015.

Thread Status:
Not open for further replies.
  1. yuliyF

    yuliyF

    Joined:
    Nov 15, 2012
    Posts:
    197
    UnityLighting, twobob, Arowx and 3 others like this.
  2. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    So it's available on Firefox and Chrome 57, so we are only waiting for it to drop on Edge and Unity 5.6?
     
    kenshin and yuliyF like this.
  3. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    As mentioned before, wasm support is available in Unity as of 5.6, as an experimental feature.
    Regarding Edge, Microsoft is actively working on it. Here is a recent update from them.
     
    twobob likes this.
  4. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    that's the goal, but as you can imagine it also depends on the browsers implementation of wasm compilation/runtime.

    This is where Unity users, as wasm early adopters, can play an active role in how this new standard stabilizes: give it a try, submit bug reports and share results.
     
    twobob, arumiat and kenshin like this.
  5. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    When wasm is finally official is the idea that where available it will be used but if an older browsers is still active UnityLoader will fall back to non wasm, or do we need to handle that ourselves? I'm assuming UnityLoader.js does all that but just checking.
     
  6. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    Yes, UnityLoader handles that already.
     
    twobob likes this.
  7. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    So we can use it in production safely or we must wait after the official release?
     
    BartNT likes this.
  8. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    Yes, as "save" as an experimental feature gets. Expect there to be bugs which we are keen to hear about from you via nice bug reports :)
     
    twobob likes this.
  9. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    As @Schubkraft wrote, WASM is in 5.6, and is expected to work. The main reason for the "experimental" label is that the technology received very little testing before shipping - because the feature has just started shipping in browsers few weeks ago, with browser vendors doing some last-minute changes before release. So, while we are not aware of any issues with it, we did not have enough time to get the feedback and testing to have the confidence to release it as fully supported. That said, please do try it and help us find any issues which may still be around!
     
    twobob, kenshin, roka and 1 other person like this.
  10. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    2,058
    And that's what I came to this thread to check. How often is the post you want on the last page? :)

    The "Network" inspector confirms successful delivery in FF 52.0.2 from here.
    Gasp. A pluginless platform for the web. Like on the horizon?
    Thanks for including the support in 5.6. much appreciated.

    No bugs so far
     
  11. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Is there a way to monitor how the browser vendors are getting on with this ?
     
  12. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    You can go to https://browserleaks.com/webgl and check if your browsers supports the "WEBGL_compressed_texture_s3tc_sgrb" extension. Currently none do (for me).
     
    arumiat likes this.
  13. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    Chrome Version 57.0.2987.133 seems to support it on my side
     
    arumiat likes this.
  14. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    Hmm, I can see it support this: WEBGL_compressed_texture_s3tc
    But not WEBGL_compressed_texture_s3tc_sgrb which I assume is different
     
  15. ypoeymirou

    ypoeymirou

    Joined:
    Jul 31, 2015
    Posts:
    54
    My bad :)
     
    arumiat likes this.
  16. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    Looks like it's available in Chrome Canary, it might be a while until it reaches stable channels.

    Chrome Version 59.0.3067.0

     
    arumiat likes this.
  17. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Not for me, but might have a different implementation status on OS X and Windows (I'm on OS X).
     
  18. jonas-echterhoff

    jonas-echterhoff

    Unity Technologies

    Joined:
    Aug 18, 2005
    Posts:
    1,666
    Yes, that is different.
     
  19. arumiat

    arumiat

    Joined:
    Apr 26, 2014
    Posts:
    321
    WOO!!!
     
  20. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Hi,

    I am checking standard shader results with WebGL and WebGL 2.0 and I have a question:

    are Standard shader DETAIL MAPS (albedo and normal) visualized by WebGL and WebGL 2.0?
     
  21. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
  22. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    Chrome was the first to remove the unity web player plugin and now, 2 year after that, we still can't have something "stable" for our webgl game.... unbelievable....

    Well, for you case, i have try an another game build with the web assembly support and it have also the red message :
    but his game run fine. For you, the error happen when you try to join the room infestedland, so you must have an error somewhere in your code. Try to debug your game to see from where it happen.
     
  23. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Hey roka, its definitely something with web assembly since the regular webgl version works fine, I also have seen other unity demos with wasm working tho.

    This is the same game without WASM and works fine: http://infestedland.s3-website-us-east-1.amazonaws.com/ it has been working fine since a while.
     
  24. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    Hum.... then https://forum.unity3d.com/threads/w...erflow-integer-result-unrepresentable.461484/

    They said "This is a known issue. You can follow the resolution process here"
    This bug has been submited a month ago ^^
    Funny joke ^^

    Maybe we will be able to get something stable in 2025 when all web browser vendors will stop to use webgl for something else .... it's unbelievable ...
     
  25. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    Well Im not complaining, webgl is very stable for me right now, Im just reporting this for Web Assembly.
     
    kenshin likes this.
  26. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Please, @Marco-Trivellato can you give me an hand? :)
     
  27. roka

    roka

    Joined:
    Sep 12, 2010
    Posts:
    598
    Yeah, but this bug has been submitted the March 15 and it's still not fixed. Now i can finally build my game with the version 5.6 but i got the same error ^^ Just have to wait.
     
  28. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    Could you open a new thread? (If you already did, we might have missed it)
     
  29. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
  30. CrazyGamesCom

    CrazyGamesCom

    Joined:
    Nov 11, 2016
    Posts:
    16
    In the original thread you said this:
    A very common question we get is when we plan to support mobiles with Unity WebGL. While we currently don’t do anything in order to prevent running content on mobiles (other than show a warning), in general, success rates are rather low (some high-end Android mobiles yield decent results, but most everyday end-user devices - not so much.). We don’t expect to see much change here before the above points on memory and performance see some significant improvements and performance of mobiles will have improved in general, so we cannot give any ETA on mobile support. We do believe that it will inevitably happen as technology progresses in the future, though.

    What's Unity's current view on mobile WebGL support?
     
  31. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    We made progress and some type of content might run on high-end devices but we are not there yet. On desktop browsers, I think we in a much better spot than 1-2 years ago when it comes to memory consumption and things will improve further as browser vendors migrate users to 64-bit versions of their browsers as well as implement features like Large Allocation Header. WebAssembly is also supposed to improve performance and memory. The caveat here is that although wasm is already available, browser vendors are still working-on/improving their implementations, so it will take a few months to see all benefits as well as support on all major browsers. At the same time, we at Unity are still working on improving our own implementation.

    All these things are improving the experience on desktop browsers, but obviously mobile ones will benefit too.
    There are many moving parts involved so it's impossible for us to say when mobile browsers will be officially supported.
     
    twobob likes this.
  32. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    Any idea on when it's likely to move from experimental to official, it sounds like even though things are still improving it does currently work to some degree. I know it's on by default now in Chrome and Firefox.
    Will that be part of the 5.6 cycle at least?
     
  33. ThainaYu

    ThainaYu

    Joined:
    Nov 4, 2016
    Posts:
    18
    Since Chrome 57 lauched I have try develop my app with webgl test with some android and ios device.
    Success rate could be considered good on android. But it seriously too long compile time. I use progressbar to know that load time is just less than 10 second but then it freeze for more than 5 minutes in mobile. I'm sure that whole JIT compiler take on unity's webassembly

    The worst is. using assetbundle reduce overall time consume. But then in ios device it will crash after finish loading assetbundle. I don't know why yet

    Still it rather promising when I use on android. Performance is really usable.

    But I think the most problem is unity has ridiculous webgl build process

    From C# to C++ to emscripten to webgl. All those step decrease performance and increase garbage library. It seriously took 10 to 30 minutes just to build and run a small project. 5 minutes to load on device. Just changing 1 line of logic is waste my life like nightmare

    And seriously, the plugin system for webgl (jslib) is worse than junk. It cannot even take dynamic callback lambda
     
  34. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    That's a hard question;)
    At the moment, we don't know when wasm support in Unity will come out of Experimental. Perhaps, when we prove that Unity WebGL content w/ wasm support can run reliably on all major browsers. Right now, things a looking promising on Firefox and Chrome, with the exception of a couple of bug reports we received. We will see what happens with wasm support in Safari and Edge, which is currently in development (it is actually available i Safari Technology Preview and Edge 15 in Windows Creators Update).
    Besides stability we also need to consider how fast the content can be loaded and run. Browser vendors are working on this and will improve over time.

    Maybe ask this question again in a few months? :)
     
  35. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    @Marco-Trivellato - has there been any movement on SPLIT_MEMORY support? (esp. in WASM it seems like that's a core part of the spec, but as best we can see Unity isn't using it yet); for our use, it's really a critical feature, and it'd be great to have out of the box.

    EDIT: SPLIT_MEMORY or memory growth. Seems like both aren't enabled.
     
  36. ThainaYu

    ThainaYu

    Joined:
    Nov 4, 2016
    Posts:
    18
    From my experience experiment. WebAssembly almost always faster than normal webgl build. Even take the compile time to account. Performance for webgl js build cannot be acceptable in my machine. But webassembly is somehow good
     
  37. wenderRondonia

    wenderRondonia

    Joined:
    Mar 15, 2015
    Posts:
    29
    with web assembly my game runs with 30 fps on 1Ghz dual core, otherwise it drops to 5fps hehe
    Also found a statistic about support webgl 2.0, which is near 50% on desktops :( source : http://webglstats.com/
    anyone knows how about the roadmap of webgl 2.0?
     
  38. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    webgl2.0 in Unity? It's been available for a while. If you make a build with the current stable version (5.6), the content will use webgl2.0 if supported by the browser, otherwise webgl1.0
     
    twobob and wenderRondonia like this.
  39. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
    Hey @Marco-Trivellato
    any chance the web GL road map can get updated. Seems majorly out of date.
    Also I noticed the other day that Microsoft Edge works crazy good now. Great performance, it even caches the game. The only reason why its unusable is the mouse doesn't work? when the mouse goes into the webGL container box it disappears. Certainly that should be fixable?
     
  40. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    do you mean the public roadmap? The fact that there is not much on the roadmap does not mean we are not working on making Unity WebGL better.
    This is mostly due to the fact that at the moment we are working on incremental improvements and maintenance. For example, improving stripping and build report tool, upgrading emscripten, getting our internal test suite to run with WebAssembly, usual bug fixing and back-porting, etc...

    Having said that, if there is something you would like to see implemented in 2017.3. 2018.1 and beyond, now it's the time to speak :)

    One of the feature we are considering is High DPI support so that you can actually take advantage of high resolution displays if you want to.

    Great to hear!
    I should but It might be a bug in Edge itself. Could you please submit a bug report so we can take a look?
     
    kenshin likes this.
  41. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    The memory profiler is still a bit touch and go for us with WebGL - still getting lots of issues where it's impossible to get a debug dump out of it.

    We're chasing a memory leak at the moment, which we suspect is related to UnityWebRequest's GetTextures function not releasing memory (started in 5.6, wasn't present in 5.5); and having a reliable memory profiler would be a big help.

    The other big request I'd like to put in is "support" for SPLIT_MEMORY (or an equivalent - it seems WebAssembly should support this particular functionality well) out of the box - even if Chrome is a bit funky with it.
     
    kenshin likes this.
  42. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    940
    Is there any chance of having webgl working on mobile browsers?
     
    arumiat likes this.
  43. JJJohan

    JJJohan

    Joined:
    Mar 18, 2016
    Posts:
    214
    There's a good chance I'm talking nonsense here, but after seeing that Unity developed an extension to WebGL to support linear rendering.. Is there a possibility of providing an extension to support geometry shaders, or is this something that we'll have to wait for Khronos to introduce in a future WebGL version?
     
  44. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    AFAIK, there is no geometry shader support in webgl at the moment. I believe Khronos is discussing what should be included in WebGL2.1, perhaps geometry shaders are going to be considered.
     
  45. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    +1
     
    kenshin likes this.
  46. Shadowing

    Shadowing

    Joined:
    Jan 29, 2015
    Posts:
    1,648
  47. xAvatarchikx

    xAvatarchikx

    Joined:
    Aug 17, 2012
    Posts:
    69
    Are there any plans for theards? In the upcoming versions
     
  48. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,401
    From the first post:

    --Eric
     
  49. Marco-Trivellato

    Marco-Trivellato

    Unity Technologies

    Joined:
    Jul 9, 2013
    Posts:
    1,654
    We are planning to resume working on native threads support as soon as we are able to upgrade emscripten, probably sometime in September.
     
    kenshin likes this.
  50. yuliyF

    yuliyF

    Joined:
    Nov 15, 2012
    Posts:
    197
    It will be cool, if we can reduce time on starting WebGL loading. All resources has been loaded from bundles, but what about the code?
    All code(50k+) is in one file .asm.code.unityweb and when it's stat repacking - it take a long time and crash on week laptop. How can I fix it?
     
Thread Status:
Not open for further replies.