Live data from Hacker News

Apple proposes new web 3D graphics API

webkit.org

521–530 of 650 posts

Re: Apple proposes new web 3D graphics API

#521
post #518

Earlier quoted context omitted.

It's Metal-inspired, but we tried to use JS API design idioms where possible. It does help that Metal is already an object-oriented design instead of bare functions passing around primitive values and structs.

Ha, sorry I wasn't aware that you're on the WebGPU team when I replied. Please don't forget about us emscripten users, I'd love to give WebGPU a whirl with my C++ mini-3D-framework ( http://www.github.com/floooh/oryol ), would be interesting how the C/C++ code would differ from the Metal rendering backend, and how performance compares to WebGL on one hand, and Metal / GL on the other.

I'm being a little generous to myselff with saying "we". I'm on the WebKit team and I followed this project but I wasn't personally involved in implementing it.

Re: Apple proposes new web 3D graphics API

#522
post #479

Earlier quoted context omitted.

Not if you take Android into account.

Which is why I have precisely written GNU/Linux. Android is a Java based OS, which happens to use Linux as kernel, Google can very easily change it to something else. Only these set of C and C++ libraries are available to native applications on Android, which happen to be compiled to a .so anyway, to be loaded inside ART/Dalvik. https://developer.android.com/ndk/guides/stable_apis.html Trying to link into any other G…

Correct, Android is not GNU/Linux, I responded too fast. As the parent comment spoke about DirectX support, I should have phrased it 'Android is also in the camp of "Doesn't support DirectX" and counts for a large number of devices.'

Re: Apple proposes new web 3D graphics API

#523
post #504
post #501

Earlier quoted context omitted.

Tying the implementation to a single underlying API is just another kind of lock-in. You can be locked in to an open standard just as much as a proprietary one. Suppose this had been proposed 5 years ago and been tied deeply into OpenGL? In the world of today, that would pretty much make it a dead end. It's just not the job of a standard like this to pick and choose winners at a different level of abstraction.

We did actually build a standard tied deeply OpenGL, it's called WebGL. And indeed, we foresee the need to move beyond it (though WebGL is still plenty good and not a dead end yet.) Worth noting also that Khronos is considering a slightly higher-level API than Vulkan as their next iteration. So that's another reason it would be a shame to bind too tightly to Vulkan. I also find it puzzling how designing to support mu…

Platform "lock-in" and "openness" are not mutually exclusive.

Lock-in refers to how that platform affects your options for deployment.

Openness refers to how that platform is being developed.

A platform can be designed in an open way, but if it only works in one environment (e.g. browser) you might consider that to be "locked in". As in, you are "locked" into using a browser for deploying your application.

Vulkan is open, in the sense that it is an open standard. It's managed in a way that allows a wide variety of people/companies to contribute to it's design and implementation.

Vulkan as an API is an abstract model for how a GPU works. Everyone codes to that spec, and they can work on a wide variety of systems. So you are not locked in to a limited set of systems.

In fact, if you wanted to make your own Vulkan implementation you could, and there is a lot of documentation, conformance tests, etc to help with that.

Supporting multiple backends naturally requires an abstract API on top to handle the inconsistencies in the underlying systems. A new API naturally means that existing code would need to be refactored to work with it. If that API only serves the purpose of executing within a specific context, you might consider that to be "lock-in" for that platform.

Re: Apple proposes new web 3D graphics API

#524
post #429

Earlier quoted context omitted.

It is, given that Vulkan only has quality drivers on Android 7, currently 0.7%, and GNU/Linux, currently 2% of the desktop market, as per Steam dashboard. Windows 10 is at around 25% currently.

However, those Windows 7 and 8 machines with AMD and Nvidia GPUs do support Vulkan.

Yes, with these wonderful set of games:

https://en.wikipedia.org/wiki/List_of_games_with_Vulkan_supp...

Versus these ones:

https://en.wikipedia.org/wiki/List_of_games_with_DirectX_12_...

Re: Apple proposes new web 3D graphics API

#525
post #83

Earlier quoted context omitted.

"We're not complaining, we're explaining the lay of the land." The "lay of the land" is that the rest of the world is adopting Vulkan, and therefore the right target for WebGPU is very obviously Vulkan. Even macOS and iOS can (theoretically) support it thanks to MoltenVK [0], and Vulkan is already available on Windows. Trying to wrap all three "major" native APIs is pointless when there's already one that works every…

Vulkan on Windows is all based on unofficial drivers that don't come with Windows and aren't supported by MS. We don't think it's right to depend on this even if it's theoretically possible. Likewise for unofficial macOS/iOS drivers.

> Vulkan on Windows is all based on unofficial drivers

Drivers from GPU vendors are as official as it gets.

Re: Apple proposes new web 3D graphics API

#526
post #222
post #124

Earlier quoted context omitted.

I would much prefer hardware vendor supplied drivers since they have an active interest in adding support for newer versions of graphics apis. OS vendors have proven to have a very poor track record supporting newer versions of graphics apis that they did not create themselves. (Microsoft support for OpenGL on Windows and OpenGL/Vulkan support on Mac). Calling driver vendors "unofficial" seems a bit backwards to me.

You're leaving out the "official" counterpart- Direct3D drivers. Microsoft and hardware vendors both have an active interest in adding support for new versions there.

Microsoft has interest for pushing new versions only in new OS releases and uses that to push these new OS releases - see DirectX since 10.

GPU vendors do not care, they will give you API to their hardware for any OS version that moves their wares. That's why I would trust more GPU vendors than OS vendor.

Re: Apple proposes new web 3D graphics API

#527
post #309

Earlier quoted context omitted.

What do you mean by "unofficial drivers"? Looking at the support matrix on Wikipedia, it seems that both NVIDIA and ATI support it in their official Windows drivers.

I believe he means unofficial as in not provided by Microsoft. Microsoft works to make sure Direct3D works and I imagine they have lots of tests and compatibility suites there. I'm guessing they don't have any tests or standards were requirements around Vulcan.

> I believe he means unofficial as in not provided by Microsoft.

Microsoft is only middle-man, the drivers are written by GPU vendors in the first place. Why should I prefer middle-man to the original source?

Historically, the drivers provided by Microsoft via Windows Update were worse (older) than those provided by GPU vendors directly.

> Microsoft works to make sure Direct3D works and I imagine they have lots of tests and compatibility suites there.

So do Khronos group and GPU vendors for Vulkan.

Re: Apple proposes new web 3D graphics API

#528

Earlier quoted context omitted.

Do you even know how Vulkan works? The driver API exposes a layered stack. It's trivial to add a validation layer between the driver and the client. It's SO much better than existing OpenGL or DirectX driver models for this one reason alone.

Yes, I do. I'm also slightly familiar with OpenGL and Metal. I think Metal has a better API. You are free to disagree of course.

No, I don't like your opinion, therefore you're off topic and should leave the dicussion.

/s

Re: Apple proposes new web 3D graphics API

#529
post #469

"Only platforms without Vulkan are Apple's" is most certainly NOT true. The Xbox One is a widely available platform for which a lot of 3D effort is invested, and rewards this effort really well - much better than other platforms (like desktop Linux or old versions of Windows) that are frequently thrown around as arguments for "Vulkan everywhere". It is a common observation among game developers who have really tried…

>>It is a common observation among game developers who have really tried both that Metal is a much more accessible API than Vulkan; "90% of the performance for 10% of the effort". Any citation on the matter?

No, sorry, this particular quote is from a private channel.

But see this: https://twitter.com/aras_p/status/749546349474054144 https://twitter.com/aras_p/status/767740566792724480

and this:

http://zeuxcg.org/2016/12/01/metal-retrospective/

and this:

https://twitter.com/search?q=from%3Azeuxcg%20metal%20vulkan

Re: Apple proposes new web 3D graphics API

#530
post #498

Earlier quoted context omitted.

> assuming that the client can implement abstractions more efficiently as they are more tuned to his needs. off topic, but who is the client?

The part of the software calling/using the API. So, if you are writing a C++ application targeting the API, you should be able to implement high level abstractions at least as efficient than an API provider could. Possibly more efficient, as you can tune your abstractions to your very non-generic needs. An API provider though has to implement the more common use cases which might bring inefficiencies. However this tu…

> tuned to his needs

Is there a specific person you're talking about, or just a programmer in general? Does this have to be male, or are women also allowed to code?

I can only imagine the type of flack I'll get for raising this hear, but I find it difficult to parse sentences that are overly specific about a general collective of people. There's no need to mention gender here - consider using something like "they" instead.

Post reply on HN