Live data from Hacker News

Apple proposes new web 3D graphics API

webkit.org

131–140 of 650 posts

Re: Apple proposes new web 3D graphics API

#131
post #79

Earlier quoted context omitted.

I think you are wrong on that. Vulkan is a low-level native API, not a JavaScript API for the web. Lots of design work needs to be done. In addition, even on platforms where there are unofficial Vulkan drivers (such as Windows), it's likely the natively available API will still have more complete support and better performance. So either way, we need a cross-platform graphics API. Let's focus this discussion on impro…

> Lots of design work needs to be done. So support Vulkan and then let's do the design work! The choice of underlying system API has effects on the design of the upper layers. Your refusal to support Vulkan is blocking progress.

Why so combative? How is a JavaScript API standard going to benefit from Vulkan support on Apple platforms? More specifically, how will a JS API benefit from being built exclusively for Vulkan, instead of multiple "APIs that have nuanced architectural differences", to borrow Dean's phrase?

Re: Apple proposes new web 3D graphics API

#132
post #76
post #41

Earlier quoted context omitted.

We're not complaining, we're explaining the lay of the land. Working on top of all three of these APIs is totally doable and will result in a better API for the web. Things worth noting: - We believe other browser vendors agree with us that the web API should work on all three of the major native APIs. - The web has security requirements which force us to go a bit higher-level than Vulkan anyway. I understand your de…

While I have your attention - what can be done to improve the state of Vulkan and OpenGL on the mac - its the single biggest reason for me to ragequit the OSX platform every time I try to give it a shot.

I think you'll want to talk to Apple Developer Relations and see if they can put you in touch with the teams responsible for the GPU-level stuff. We as the browser team can't do much with this feedback.

Re: Apple proposes new web 3D graphics API

#133
post #104
post #82

Earlier quoted context omitted.

Why come up with a new API for this? Why not use the one supported by Google, and MS, Vulkan? We dont need another (a fourth!) API for the same thing. Introduce a web variant like Khronos with with WebGL (its almost like OpenGL ES, which is almost like OpenGL).

> Why not use the one supported by Google, and MS, Vulkan? https://www.lunarg.com/faqs/microsoft-support-vulkan/ "Microsoft has not expressed intent to support Vulkan."

and the next sentence goes "However, there are well defined mechanisms by which IHVs can ship a Vulkan driver on any version of Windows. But it will be as it is the case now with OpenGL. That is, it is up to the application to negotiate with the implementation to install an appropriate Vulkan driver for the hardware that is on the machine."

Also "Vulkan is available on all versions of Windows that are on DirectX 12, so there is potentially some value to the developer community to having a single API that spans multiple Windows versions."

Vulkan is fully supported on Windows with semi-recent GPUs (e.g. its supported by Nvidia with Geforce 6xx - released in 2012!) by all vendors.

The article is only saying that MS defers what API is supported to GPU manufacturers. Its not supported by Xbox and Windows Phones, but Xbox is a very different market and no one cares about Windows Phone.

Re: Apple proposes new web 3D graphics API

#134
post #102

Earlier quoted context omitted.

So if it higher level than Vulkan where does it fit in with WebGL? I mean can't you pretty much already use low level GPU tech like Vertex Buffers and Shaders already?

If you draw a 2-dimensional chart of low-levelness vs performance, Vulkan, DirectX12 and Metal are all higher performance and lower-level than OpenGL. Metal is a bit higher level than the others and Vulkan is probably the lowest level, but they are about the same performance. WebGPU is a bit closer to the Metal level than the Vulkan level, but it's still lower-level and higher-performance.

Thanks that helps me understand better. I'd like to see a more detailed comparison of WebGPU/Metal/Vulkan in terms of their level of abstractions.

Re: Apple proposes new web 3D graphics API

#135
post #41

Earlier quoted context omitted.

We're not complaining, we're explaining the lay of the land. Working on top of all three of these APIs is totally doable and will result in a better API for the web. Things worth noting: - We believe other browser vendors agree with us that the web API should work on all three of the major native APIs. - The web has security requirements which force us to go a bit higher-level than Vulkan anyway. I understand your de…

> I understand your desire to have Vulkan on Apple platforms, but it's really a separate issue from the right target for WebGPU. No, it's not a separate issue. If Apple supported Vulcan, the simple act of proposing this new API as a standard would be laughed out of the room. We can only speculate why Apple won't support Vulcan but I'm going to go with "Prefer a solution they designed themselves over one designed by o…

I agree

Re: Apple proposes new web 3D graphics API

#136
post #69

Earlier quoted context omitted.

Why is DirectX support needed? Isn't Vulkan supported on the same platforms as DirectX anyway?

We expect DirectX 12 drivers to be more complete, more performant, and more likely to be available out of the box without a separate install. We expect Windows browsers will want to build on top of DirectX, not Vulkan.

https://www.lunarg.com/faqs/microsoft-support-vulkan/

Microsoft won't support Vulkan officially, and apps would have to install their own Vulkan drivers.

Re: Apple proposes new web 3D graphics API

#138
I'm glad to see Apple getting interested in web standardization again, but I'm not a big fan of this one. Wouldn't a WebGL 3.0 based on Vulkan make more sense? I'd much rather see Apple warming up to Vulkan rather than have so much Metal influence on a common web API.

From a dev perspective my thinking is this. If I were to learn a 3D graphics API for the web I'd like that knowledge to be transferable to native development as well. An API built on Vulcan - even if abstracted - would be more pertinent and more compatible with existing tools than one built on Metal.

I'll be curious to see comments from other committee members as they'd have more insight on the subject.

Re: Apple proposes new web 3D graphics API

#139
post #83

Earlier quoted context omitted.

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 that don't come with Windows and aren't supported by MS. This is not materially different than the situation with OpenGL, and yet I hope you'll agree that basing WebGL on OpenGL was the right decision, rather than inventing a new API based largely on a lower level API proprietary to a single company's platforms.

As it happens, OpenGL was so high level that supporting it on top of DirectX was feasible. A number of Windows browsers use the DirectX back end to ANGLE, so users don't have to download OpenGL drives.

Unfortunately, that doesn't work as well for Vulkan. Vulkan is the lowest-level of the three APIs, so it's hard to support on top of Metal or DirectX 12.

Re: Apple proposes new web 3D graphics API

#140

Earlier quoted context omitted.

The optics are just really bad. Apple could say "In the mean time we'll support Vulkan" and bam! there is a cross platform solution. Instead you say "We will generously let everyone implement our specifications, we hate to see everyone suffering so, but if everyone else works really hard to do what we say, things will be great!"

...but Vulcan wouldnt run in a web browser anyway so whether Apple platforms support Vulcan or not is kind of beside the point, isnt it?

That's like saying "OpenGL doesn't run in a web browser"... and then it did, because someone understood that having 99% the same API and shader language support in a web browser as what is used in native applications is extremely high value.
Post reply on HN