Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

how about WebGPU

Discussion in 'WebGL' started by Handsome-Wisely, May 6, 2022.

  1. Handsome-Wisely

    Handsome-Wisely

    Joined:
    Mar 20, 2013
    Posts:
    98
    i hear webgpu, it is quick than webgl. what version will support it.
     
  2. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    It's being investigated. WebGPU is still in active development as a standard, it's implementations by browsers still in flux, so it's not something that can be released any time soon.
     
    James_Arndt likes this.
  3. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    @brendanduncan_u3d , very understandable.

    Do you have plans to share in-progress packages as an experimental package during its active development phase or will you wait until the 1.0 draft is finalized?
     
  4. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    Sorry I can't give a satisfactory answer to that, it's complicated. I can say it's being investigated, and its importance is understood. And we have a close relationship with the standards committee and browser implementors to help make sure WebGPU will be as good as possible, especially for scaling up to Unity level assets and projects. It should also be known that, at least initially, there will be some things that WebGL can do that WebGPU cannot do (and vise versa, of course), due to the WebGPU API. But I can't say anything official about Unity's plans for it. Sorry.
     
    KamilCSPS likes this.
  5. Handsome-Wisely

    Handsome-Wisely

    Joined:
    Mar 20, 2013
    Posts:
    98
    quickly don't defeat by UE.
     
  6. Handsome-Wisely

    Handsome-Wisely

    Joined:
    Mar 20, 2013
    Posts:
    98
    do something in github. like stream rendering
     
  7. AdrienRoussel

    AdrienRoussel

    Joined:
    Sep 20, 2018
    Posts:
    3
    Is there any news about when WebGPU will be implemented ? Or maybe a roadmap ? I think a lot of people are very excited about this features !
     
    GDevTeam likes this.
  8. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    It's in-progress on Unity's roadmap (why the roadmap page is in "Beta Program" on the website never ceases to amaze me): https://unity.com/roadmap/unity-platform/platforms
     
    GDevTeam likes this.
  9. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    WebGPU support is in active development.
     
    MousePods, GDevTeam, Stream and 2 others like this.
  10. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    Any insights you can share on the challenges you have encountered since last May? Curious to any details on how it will be implemented, at least experimentally.

    Thanks
     
  11. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    28
    Since you seem connected to the dev teams working on this, I'll share a little confusion.

    How can you say that you are rolling out this feature early " to get feedback and improve quicker", when the Android mobile platform, the only one truly in need for optimization was left out?

    All other platforms can make use of much more powerful hardware and cheat by increasing power consumption.

    Plus, all the demos i hav seen show "problems" that can be solved by simple batching ... OR show scenarios that 99 percent of games won't even feature!

    I can't say I'm interested in yet another framework that is "better" only by utilizing an already present and expensive hardware, instead of optimizations that increase speed and compatibily across all devices, while also reducing manifacturing costs.

    Then, webgl 2.0 even in unity when you actually learn how to make it work is even more stable and rewarding than standalone, and FASTER than Playcanvas(wierd i know, but trust me it IS!!!) as you are forced to really optimize every aspect of your game, from garbage collection to shader operations to memory ... while also making development more chill and relaxed.

    What is there in webgpu that forces developers to NOT be lazy?

    Or at least fix enough problems automatically that the game doesn't become a memory hog running at 25 fps on a chip equivalent to a 1060 gtx?

    I stopped playing games for that reason :(

    webgl 1, 2 and now gpu should be all maintained in my opinion.

    The mobile market is just too diverse to start telling people "upgrade, or else" ... because that "ELSE" is quite litterally a button press and a 0.5 secons of load time away!

    Just ... keep working on that webgl2.0 support ... okey? ... pretty please?

    It's funny, as I see people complaining about webgl unity, while I am currently using a bugged version of the engine with a known memory leak ... but the actual build works at 30+ fps even on a huwaei from 10 years ago with no problems!
     
    GDevTeam likes this.
  12. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    Hi Zarod,

    I'm not entirely sure what your rant is about, but I'll try to answer some of your questions / concerns.

    The TLDR; is that WebGPU will not replace WebGL now or in the forceable future. Both will be supported and both have their strengths and weaknesses.

    How can you say that you are rolling out this feature early " to get feedback and improve quicker", when the Android mobile platform, the only one truly in need for optimization was left out?

    What do you mean Android is left out, and the only one truly in need of optimization? Both of those statements are not true, for either WebGL or WebGPU. For WebGPU, Google just released the early alpha testing release of WebGPU running on Android. Unity will support the platforms supported by WebGPU.

    All other platforms can make use of much more powerful hardware and cheat by increasing power consumption.

    That's always been true, for both WebGL and WebGPU. WebGPU won't magically make things faster. Developers will always be pushing the boundaries of hardware limits, and more powerful hardware and cheats will always help adjust those limits.

    Plus, all the demos i hav seen show "problems" that can be solved by simple batching ... OR show scenarios that 99 percent of games won't even feature!

    Again, WebGPU won't magically make things faster, and batching is always preferable for any graphics api. What WebGPU provides that WebGL does not, is compute shaders. While 99 percent of games might not care about that feature, there are internal uses in the Unity engine that will help improve performance. Animation skinning, for example, is calculated on the CPU for WebGL, and will use compute shaders to run on the GPU on WebGPU.

    I can't say I'm interested in yet another framework that is "better" only by utilizing an already present and expensive hardware, instead of optimizations that increase speed and compatibily across all devices, while also reducing manifacturing costs.

    That's fine, WebGL will continue to be available, supported, and improved.

    Then, webgl 2.0 even in unity when you actually learn how to make it work is even more stable and rewarding than standalone, and FASTER than Playcanvas(wierd i know, but trust me it IS!!!) as you are forced to really optimize every aspect of your game, from garbage collection to shader operations to memory ... while also making development more chill and relaxed.

    I'm glad you're having success with WebGL2. We work hard on it, and will continue to do so.

    What is there in webgpu that forces developers to NOT be lazy?

    I don't think there is anything in any of this that will force developers to be lazy. From the developer's perspective, there is little to no difference using WebGPU or WebGL. Some features in Unity that are not available on WebGL, like compute shaders, will be available with WebGPU, but there is no requirement to use it. If WebGPU is the current graphics api at runtime, some things will be able to utilize it, like animation skinning. But it will not be some new thing. It will be no difference than choosing the OpenGL ES graphics api, or the Vulkan graphics api, when building for desktop or Android.

    Or at least fix enough problems automatically that the game doesn't become a memory hog running at 25 fps on a chip equivalent to a 1060 gtx?

    We continue to work on the web platform with a lot of concern for memory and performance and start-up time. Developers will still have the freedom to pay attention to memory and performance of their own content, or not.

    I stopped playing games for that reason :(

    I'm sorry, games can be fun.

    webgl 1, 2 and now gpu should be all maintained in my opinion.

    I agree! Other than WebGL 1 is being deprecated because it really is very limited and continuing to support it means being able to support other things less, and the world is moving on to WebGL2. But in no way will we stop investing in supporting and improving WebGL, in addition to WebGPU.

    The mobile market is just too diverse to start telling people "upgrade, or else" ... because that "ELSE" is quite litterally a button press and a 0.5 secons of load time away!

    I agree, you can't do that, especially for the web. That's why projects can and should be developed to make use of hardware when available, and have a backup plan for low end. For example, you can check if compute shaders are available in the current runtime, and use them in the project if it's running on WebGPU, but have an alternative method if not. But Unity just provides the means for people to do that, developers still have the choice to do so or not.

    Just ... keep working on that webgl2.0 support ... okey? ... pretty please?

    Absolutely!

    It's funny, as I see people complaining about webgl unity, while I am currently using a bugged version of the engine with a known memory leak ... but the actual build works at 30+ fps even on a huwaei from 10 years ago with no problems!

    That's awesome. We'll continue working hard on the platform.
     
    rdjadu likes this.
  13. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    Hi KamilDA,

    It will be implemented as a Graphics API. In the WebGL Player Settings (we really need a new name for the web player now), you'll be able to add WebGPU to the Graphics API list, and if WebGPU is available on the browser at runtime, it will be used, otherwise fall back to the other graphic api's in the list. There would be nothing "WebGPU" you would need to do in the project, but some APIs in Unity will work when WebGPU is running, that wouldn't work when WebGL is running, such as Compute Shaders. So in your Unity project, you can check "is compute shaders available", and use them if they are, which would be true for WebGPU and false for WebGL.

    Our current plan is to get an early experimental version in 2023.2 (minus unforeseeable circumstances). Experimental means it will be labeled experimental, and will not be in the Auto Graphics API list, so it will need to be explicitly added to the project. It will also not be without bugs, and there will be a lot of things people will try to do, like copy projects that work on other platforms, that will not work because the WebGPU specification has more limitations than other platforms, at least initially. But things will improve over time. And running compute shaders on the web is fun! :)
     
  14. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    Thank you for the detailed answer.

    You mentioned how WebGPU will enable running compute shaders. This is great and will benefit many projects. Are there other examples of 'low hanging' fruit where you see the implementation of WebGPU having a short-term impact? Without any engagement - just a wish list based on existing experimentation you've been doing?

    For example, the quick & dirty approach to getting a WebGL project up and running is to use URP. Wouldn't WebGPU enable (in theory?) HDRP too? Or do you foresee maybe URP development be "unshackled" by WebGPU, in the mid-long term, as it possibly had been by WebGL2?

    You also mentioned that people will try to migrate projects from other platforms to WebGPU and fail. My understanding from your post is that WebGPU will be an optional "addon" (but not a replacement to be selected in the graphics API list), at least initially. Thus enabling additional rendering pipeline features that would had been disabled by default. Is the end goal to actually add it to the graphics API list and be able to do 'pure' WebGPU projects or will it be managed completely differently (forever just an add-on ?).
     
    Last edited: Feb 1, 2023
  15. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    You mentioned how WebGPU will enable running compute shaders. This is great and will benefit many projects. Are there other examples of 'low hanging' fruit where you see the implementation of WebGPU having a short-term impact? Without any engagement - just a wish list based on existing experimentation you've been doing?

    It's hard to say. There are a number of performance issues we're still working through, with Google and the other WebGPU implementors to make sure browsers can handle data with the complexity of Unity.

    For example, the quick & dirty approach to getting a WebGL project up and running is to use URP. Wouldn't WebGPU enable (in theory?) HDRP too? Or do you foresee maybe URP development be "unshackled" by WebGPU, in the mid-long term, as it possibly had been by WebGL2?

    HDRP will not be supported, at least initially. It does not support mobile, and therefore uses features that are not available on WebGPU. But URP will be supported. I'm not sure what needs to be unshackled, but I know the SRP team is working on stuff to improve things.

    You also mentioned that people will try to migrate projects from other platforms to WebGPU and fail. My understanding from your post is that WebGPU will be an optional "addon" (but not a replacement to be selected in the graphics API list), at least initially. Thus enabling additional rendering pipeline features that would had been disabled by default. Is the end goal to actually add it to the graphics API list and be able to do 'pure' WebGPU projects or will it be managed completely differently (forever just an add-on ?).

    By "try existing projects and fail", I meant WebGPU has certain limitations that a number of existing projects will try, but won't work. Not that they would work on WebGL. Things like WebGPU does not support synchronous readback of buffers or textures. That means some projects might call something like GraphicsBuffer.ReadData, which wouldn't work. Only the AsyncGPUReadback api can be used to read buffers and textures with WebGPU. So if a project were calling ReadData, it wouldn't work.

    WebGPU is an add-on in that it's a full graphics api, but with Unity you can choose which graphics api to use, and that will be one of the choices. In the same way WebGL 1 and WebGL 2 are two current choices. So it's no different than having a project with both WebGL2 and WebGL1 in the graphics api list in player settings. In that case, if WebGL2 isn't available, it falls back to WebGL1. With WebGPU, if you add WebGPU to the graphics api list in player settings, it would check if WebGPU is available, and if not fall back to WebGL.

    The confusing part is that we call the web player "WebGL", which is also the name of the graphics api.
     
    OmarVector and gtk2k like this.
  16. gtk2k

    gtk2k

    Joined:
    Aug 13, 2014
    Posts:
    253
    Since Compute Shaders will be available on WebGPU, will VFX Graph also be available on WebGPU builds in the future?
     
  17. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    One of the main concerns when using Web as a platform is build size. In our projects we actually remove WebGL1 support completely in our build settings in the hope that any dependencies to URP are removed as well when possible. I am wondering how much will WebGPU affect build size as it appear to be much more verbose due to it's lower-level implementation of equivalent WebGL calls.

    Agreed. The platform should had been called "Web" when the NPAPI player was depreciated. If you revert to just calling it "Web Player", I suspect it will create a lot of confusion with all the obsolete documentation for the ol'WebPlayer.
     
  18. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,339
    Calling the WebGL/WebGPU target "WebAssembly" might work.. since that is currently the only type of web browser output supported, unless I'm mistaken. Also might reduce confusion where WASM vs. JavaScript builds are concerned.
     
  19. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    @KamilDA Making sure WebGPU has as little impact on build size, especially when not used in a project, is something we're paying attention to.

    We're discussing the options for the web player name.
     
    ComputerKim and KamilCSPS like this.
  20. Zarbuz

    Zarbuz

    Joined:
    Oct 13, 2015
    Posts:
    23
    Being able to use VFXGraph with WebGPU is my dream. Really hope this can be supported in the future.
     
  21. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    It is definitely a goal to get VFXGraph working with WebGPU. It may not be initially supported, because of some limitations of WebGPU, but it is a goal.
     
    MousePods, KamilCSPS, Zarbuz and 2 others like this.
  22. Xavier78

    Xavier78

    Joined:
    Oct 13, 2013
    Posts:
    38
    @
    Is there any update on this, as I know WebGPU has progressed as a standard.
     
  23. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    I just gave the update. Yes WebGPU has started, it's well under way in development and a lot is working. There are systems, like VFX Graph, that currently require things beyond what WebGPU as a standard is currently capable of, so those things are goals to find solutions for.
     
    KamilCSPS and gtk2k like this.
  24. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    28
    That is awesome, and it's exactly what I hoped to hear from my rant.

    I wrote it because you did an amazing job with webgl, but in pretty much every post I ever read your work was taken for granted and then criticized from being bad.

    Also, most tutorials and even chat gpt 3 when asked on the subject GIVE WRONG ANSWERS!!! ... in addition to giving non-efficient solutions.

    All I heard you say makes me very optimistic about the future.
     
    brendanduncan_u3d likes this.
  25. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    I'm frustrated by the lack of good information too, and especially the wrong answers. I'm nervous about people taking things like chat gpt for granted. A lot of times it "sounds good, it must be true", but is wrong in sometimes subtle ways. Guess we can just keep doing our best to make the web the best platform we can. If we can just keep Apple in line :).
     
    KamilCSPS and gtk2k like this.
  26. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    18,870
    ChatGPT is only as good as the information that was fed to it. If it was fed mostly incorrect information then the responses it provides will be mostly incorrect.
     
    KamilCSPS likes this.
  27. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    Package Manager: Added Web3 as a Filter Category in My Assets.


    o_O That sounds related :D
     
  28. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    @KamilDA I have no idea what that is, but it sounds useful to have a web category for Package Manager.
     
    KamilCSPS likes this.
  29. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    Work progresses. As you would expect, it's a hugely complicated task integrating a new graphics API into Unity, especially one with subtle but profound limitations compared to other similar APIs, and one where the API itself is still a work-in-progress (WebGPU 1.0 has yet to be finalized). But it's coming along. As a teaser, here is Unity running on WebGPU...on Android! [disclaimer: this is just a test, not an announcement or promise from Unity]
     

    Attached Files:

    CiroContns, zloph, aktameemi and 7 others like this.
  30. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    230
    Just curious but what kind of changes were necessary to get webgpu to work compared to the approach laid out before? @brendanduncan_u3d id imagine the changes to projects are minimal but id imagine the internal had to adjust.
     
  31. KamilCSPS

    KamilCSPS

    Joined:
    May 21, 2020
    Posts:
    314
    *Excitement increases*

    That's awesome! Thank you for sharing - this is the kind of open communication on progress we love to follow from Unity.
     
    brendanduncan_u3d and adamgolden like this.
  32. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    @print_helloworld Besides the quite complex internal graphics api abstraction layer in Unity that needs to be implemented for WebGPU (and is largely working), there are a lot of graphics api specific code in places like URP and other packages that needs to be added to. The biggest hurdles is that WebGPU has a rather low end spec; it purposefully does not implement certain features (synchronous readback of textures and buffers, so synchronous read methods like Texture2D.ReadPixels don't work); and has arguably unnecessarily strict validation that breaks otherwise working shaders. The spec committee blames security necessary for the web for some of the overly strict limits and validation. Also the implementations (Chrome at the moment) are still fairly immature and have significant issues with performance for things like compiling shaders, which results in a lot of mid-game stutters. So there's a lot of work being done to try and make the out-of-box experience with WebGPU as good as it can be, and we're working very closely with the WebGPU specification committee and Google to make sure they take into account engines the size and complexity of Unity for WebGPU. The biggest pain so far is that a lot of existing projects use features that work on desktop DX/Vulkan/Metal but do not work on WebGPU because of the low end specification limits/features for WebGPU. But we're working hard to make it as fully implemented and pain free as possible, trying to work around as many of the limitations as we can.
     
  33. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    230
    thats really insightful thank you! you mentioned this intent here
    from experience implementing things to be "out of the box" in that kind of way with things that cant in the original context (and perhaps couldnt by design) incurred a lot of maintenance on something that felt I shouldnt bother to do because it would technically be bloat for projects that dont need those specific capabilities (or even worse, the original author implements something straight into the design and obsoletes the work). Was wondering which of these are such that need extra polish for us, and reimplementations on top of (I saw the screenshot of webgpu working on mobile, and honestly I was pretty satisfied with just that :))

    I love the intent and I appreciate the effort that you and your team are putting in for this! kudos
     
  34. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    28
    I was waiting for you to get to those issues

    If this ends up helping I'll be very happy (if not, well, good luck), but the solution might just be a fallback system that writes texture data to cache/idbfs, and then does operationson those as usual, same as json data ttansfer between servers and clients.

    I use it to support modding, but the downside is that texture read/write is NOT parallel.

    It stalls the application until the process is done.

    You could do 50 pixels at a time, but I am afraid Unity generates garbage of data every time you read and write anything.

    Many Blessings
     
  35. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    Using the AsyncGPUReadback API (https://docs.unity3d.com/ScriptReference/Rendering.AsyncGPUReadback.html) will be necessary to copy texture or buffer data from the GPU to the CPU with WebGPU.
     
  36. Harpaceas

    Harpaceas

    Joined:
    Feb 15, 2021
    Posts:
    4
    That's the blockchain/defi category, not related to webGPU.

    I can't wait for webGPU on Unity, the only limits I have seen are related to reading the geometry of the objects in runtime and manage textures (read/write as stated above) but I am sure that is possible to create a system to manage that, like Zarod said.
     
    Last edited: Mar 31, 2023
  37. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    936
  38. blockimperium

    blockimperium

    Joined:
    Jan 21, 2008
    Posts:
    452
  39. Zarod

    Zarod

    Joined:
    Jan 20, 2016
    Posts:
    28
    Just keep your expectations in check tho. Apart from being a Beta channel exclusive, most of the heavy lifting required to expand access to less priviledged costumers is still gonna have to be done by you, WebGPU or not.

    Talking of mobile expecially, GPU instancing and similar techniquest are not as performant as PC, and batching is fine and well ... except if you do it in Blender itself, completely negating the need for the CPU to do it while the game runs.

    Clustered lighting might require some work on WebGL, alongside the new fragmented shadow maps ( for URP).

    I think the web page assumes the work ended after rendering the first shadow map/light mask, but unity then renders all the other ones at lower resolution, they are then not cleaned from memory and the the application crashes.

    Same problem with devices assuming different default values for shaders ...

    hopefully they can figure all these things out.
     
  40. AdionN

    AdionN

    Joined:
    Nov 6, 2019
    Posts:
    15
    is there any access to it, like beta branch? Git link? It would be interesting to play with it to check basic projects.
     
  41. Liminal-Ridges

    Liminal-Ridges

    Joined:
    Oct 21, 2015
    Posts:
    251
    any update?
     
    AlonMixed likes this.
  42. AdamandEveStudios

    AdamandEveStudios

    Joined:
    Apr 19, 2022
    Posts:
    16
    webgpu is overhyped and will take months if not years for it to become industry standard. All of "features" of webgpu can be easily replicated in WebGL with proper optimization.
     
  43. atomikm

    atomikm

    Joined:
    Feb 8, 2020
    Posts:
    18
    @brendanduncan_u3d I'm curious will the Unity WebGPU implementation also support DOTS/ECS/BURST?
     
  44. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    @atomikm The issue with DOTS/ECS/BURST on web isn't with the graphics API, it has to do with multithreading support. So unfortunately WebGPU will not affect those systems.
     
  45. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    WebGPU Update: We are working as hard as we can to get an initial version of Unity WebGPU into the release branch. It will have a long list of caveats, and be far from perfect (both in terms of what we have implemented, and what Google has implemented), but I'm still excited for people to start playing with it. I can't give a time estimate because that would put too much pressure on me, but I can see the light at the end of the tunnel and really pushing to get it in a 2023.2+ release.
     
  46. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    @AdamandEveStudios That's generally true of any new graphics API. What you get out of WebGPU that you can't get out of WebGL is compute shaders, which arguably can be done with vertex and fragment shaders, though often with a lot more effort and usually less performant, especially when storage buffers come into play. Currently Google is far ahead of the game with the implementation in Chrome. But Mozilla isn't too far behind, and Apple is investing a lot into it for an undetermined release date as usual. But there is definitely overhype, WebGPU will not suddenly let you create AAA games on the web, and will not automagically make everything better. In fact, initially, there will likely be less features and performance than WebGL. But in the bigger picture, WebGL is essentially dead as a standard, it's in maintenance mode and no longer updated as a spec, so WebGPU will play a very important role for graphics on the web.
     
  47. jasonboukheir3

    jasonboukheir3

    Joined:
    Apr 13, 2022
    Posts:
    81
    I know I've seen this asked before on the forum, but I haven't been able to find a solid answer. Does the C++ multithreading support mentioned in the upcoming LTS version relate at all to multithreading with ECS?

    I don't know the details of how things work in ECS, but I know you can create multithreaded, managed systems (and jobs for that matter). However maybe those are triggered from C++ threads?
     
    Zarbuz likes this.
  48. Armitage1982

    Armitage1982

    Joined:
    Jul 26, 2012
    Posts:
    37
    Moreover, being in its infancy, there is still plenty of room for optimization, where WebGL is slowly reaching its limits in this respect. Depending on the scenario and without optimization, the actual performance gain can already be 2 to 4 times.
    In addition to real compute shader, we are also moving to a higher level of abstraction. The perfect opportunity to learn a standard that will become widespread.

    I am grateful for this "announcement" and the information given in this forum, but I saw several times the Unity logo next to the WebGPU announcements, yet I expected more anticipation.
     
  49. brendanduncan_u3d

    brendanduncan_u3d

    Unity Technologies

    Joined:
    Jul 30, 2019
    Posts:
    290
    We've been working closely with Google for quite a while now. They have been a great partner, helping work through issues with the spec, identifying areas where WebGPU will need extensions, and finding areas to improve performance. Any lack of bigger announcements is from Unity being conservative with unfinished features, which is a valid position.
     
  50. AdamandEveStudios

    AdamandEveStudios

    Joined:
    Apr 19, 2022
    Posts:
    16
    Oh man WebGL being dead is scary / sad thought :(

    Of course this is the natural progression of technology but the beauty of WebGL is that there is a steep learning curve / tremendous optimization knowledege / and incredible effort just to get everything running smooth on all devices. This is nice because it keeps the keeps # of webgl games produced incredibly low. Supply demand blah blah but I fear the day any average person can just pump out a stunning AAA game for web with zero talent / effort. I was under the impression that WebGPU was years away from becoming standard. Evidently the main problem is that majority of the world have garbage GPUs, but they weren't playing AAA games on their device to begin with.

    On the other hand it seems the growing trend in all new tech is to web so I think all us WebGL folks will be primed and ready for this new era. :D