by slimsag · 5y ago · 0 comments
It's the one API that Mozilla, Google, Microsoft, Apple, and Intel can all agree on. Nvidia and AMD are silent, but it's on top of Metal/DirectX/Vulkan behind the scenes so they don't really need to care.
Today, Vulkan with MoltenVK (for Apple devices) has more _features_, but even that is not super clear-cut. For example, mesh shaders are supported on AMD cards in DirectX 12 but not Vulkan.
It's not just Apple who continues to push their own API, either. DirectX 13 is likely coming soon, and from what I understand Vulkan gets "ported" features after they land in DirectX.
If you want bleeding edge features, you're going to need to use the native API: Vulkan on Linux, DirectX on Windows, and Metal on Apple.
But if you just want the common denominator? WebGPU native isn't a bad choice IMO. And it being a cleaner API than Vulkan may mean you need less abstraction on top to work with it.
[0] https://devlog.hexops.com/2021/mach-engine-the-future-of-gra...
How long before this API is ubiquitous though? For maximum compatibility today, wouldn't something like OpenGL ES / WebGL make the most sense?
Eventually WebGPU will get there too, but it will take time.
Sony cares about GNM and their custom shader language PSSL[1]. Seems unlikely they'll support Vulkan anytime soon either.
Arguably, it is more likely WebGPU will continue to have a reasonable translation to these platform's native APIs compared to Vulkan, given that WebGPU is the common denominator between Vulkan/Metal/DirectX.
That's not to speak of the market pressures having a large swath of browser-based games written with WebGPU would have in encouraging Nintendo/Sony to care about these.
[0] https://blogs.nvidia.com/blog/2016/10/20/nintendo-switch/
[1] https://en.wikipedia.org/wiki/PlayStation_4_system_software#...
It's entirely possible that wgpu or Dawn could implement backends for those platforms.