Edit: The talk isn't even about new API features or raytracing hardware. The only reason it's "with Metal" is because it's a WWDC talk, it could be called "implementing GPU raytracing with compute shaders" and apply to Vulkan, DirectX, OpenGL or any other modern graphics API. Another good talk along these lines is this one by Matt Swobda (https://youtu.be/ZrFkKrw1uGI).
Because the GPU ecosystem has historically been fractured. Vulkan looks like it has the potential to finally end that, but Apple has a walled garden and doesn't seem to be on board.
But I agree, such things aren't all that relevant to the article being discussed here.
I thought Mantle was what became Vulkan?
> Consoles have always used propiertary APIs
I certainly don't expect console manufacturers to adopt Metal, but at least there's the possibility of (eventual) unification with Vulkan.
> OpenGL ... support from various vendors wasn't always good and official Microsoft support lapsed
And Windows was the main PC gaming platform, so developers used DirectX instead of OpenGL as a result.
On OSX, Metal became a thing; as a result, last time I checked OpenGL was stuck back at version 4.1 (that's > 5 years behind everyone else).
I don't see Android, iOS, or Linux adopting DirectX. I don't see Windows or Android adopting Metal. If you're hoping for unification, Vulkan seems like quite literally the only possibility. Add to that Vulkan support from a variety of hardware vendors other than AMD and Nvidia as well as officially planned Vulkan-OpenCL interop and I'm actually somewhat optimistic about things.
Just because we had "OpenGL" and "DirectX" doesn't mean that there was only one thing to consider when doing engine development.
The web doesn’t automatically give you cross browser pages. You have to fix compatibility bugs and sometimes do things two ways. But it’s way easier than having separate WinForms,
Cocoa, and QT UIs.
I have long time ago learned the hard way, how the values between both communities are completely different.
The idea that we need one true programming language, or one true GPU API, or one true text encoding, and use it everywhere, looks good on the surface. It’s when one digs deep enough into technical details, it became clear why people pick less portable technologies. It’s always about tradeoffs.
For GPU API, I think #1 reason is vendors support.
On PCs, Windows is _the_ target platform for majority of game developers. The only GPU API with first-party support is DirectX. GPU vendors do descent job supporting GL and VK there (except maybe Intel), but first-party support is still better. Major parts of D3D work in the kernel, dxgkrnl.sys does quite a lot of things.
On Android and many embedded Linuxes, it’s similar with GLES. Vulkan support is improving fast, I hope in a few years VK will replace GLES there, but so far there’re many older devices.
IMO, it is a perfect example of how normal screen drawing if made using HW accelerated API could make a huge difference. This is especially true with low end hardware e.g. if Raspberry Pi (Broadcom/Videocore) had implicit support for OpenGL from the start by default like Apple has done with Metal, there could have been a decent desktop experience which is not possible with current SW rendering on low power CPU.
GPU rendering talk is getting lost with discussions about High end graphics cards or GPGPU computation, but I think Metal has brought back the focus to general screen drawing and judging from how developers like George Nachman (iTerm2) was able to take advantage of it; Apple seems to have done good with it.
My configuration to minimize variables which diminish Pi desktop experience - USB SSD boot, Zswap, Btrfs on Arch Linux 64bit (for better support for the latter 2).
1. Enabling VC4 driver at boot, enables OpenGL support to Pi.
2. For Wayland compositor, I used Enlightenment (Gnome, GDM didn't launch). I enabled HW rendering via OpenGL for all default rendering. Basic windowing experience is fast, as expected from HW rendering. Few default applications like terminal (Terminology) if used carefully(not resizing windows, not dragging etc.) works. But any other applications which use OpenGL like screenshot (or) applications which use XWayland chromium, firefox failed to launch. So, my conclusion is that this setup works only for basic windowing i.e. file transfers and careful use of console.
Perhaps Wayland via SW rendering (likely the one mentioned by you) could provide a crash free experience, but that defeats the purpose of getting general screen drawing HW accelerated (to feel responsive)?
If Apple would have acted properly, instead of their usual "eat our lock-in" mentality, they could provide Vulkan support, and then build higher Metal-style abstractions on top of it. But no, it's Apple for you. Eat Apple only Metal or get lost.
- First release of Metal is June 2014. The Khronos Group began a project to create a next generation graphics API in July 2014. First release of Vulkan is 2016.
- Metal is C++. Vulkan is C. Yes, that may matter
- Metal is specifically optimised for a specific set of hardware with known capabilities. Vulkan aims at everything under the Sun
- Vulkan is headed by a consortium that wasn't known for its great decisions in the past, and Apple might want a faster turnaround on features and capabilities
- It's just business
The Metal API is Obj-C or Swift, only the shading language is a C++ variant.
A C-API (not C++) would actually be nice. While ARC is quite convenient it also adds a significant overhead. Most of this overhead can be prevented with quite a lot of handholding, but this also reduces the benefits of high-level languages like Objective-C or Swift, I'd even argue that this handholding is more hassle than having a more explicit C-API to begin with.
- It was explained above, that Apple knew well all along, that there was an effort to make a common low level API. Well before they started Metal. So they purposefully refused to participate.
- C was a proper choice for Vulkan (short of choosing Rust let's say), since it makes it easier to provide bindings from any language than let's say using C++, making bindings to which is way more painful.
- Optimization for hardware happens on low level compilation, so it's a lame excuse not to support Vulkan.
- Faster or not, Apple could observe the result (which was good) once it was ready, and support it. They refused (because Apple).
- Business or not, lock-in is a nasty attitude that's aimed at taxing developers. There is no no need for development tools lock-in, it's a sick anti-competitive methodology, for which Apple is quite infamous.
Optimization of existing code happens at a lower level but if you can gear an API for optimal use of your hardware and existing APIs, you make it easier for developers to write code that will have a better shot at being optimized. Not all code optimizes the same way.
Also what you view as taxing developers, can also be flipped around as being able to make an API that is a lot easier for the developers on their platform.
And indeed, metal is probably the easiest of the modern graphics APIs to get started with, with a very light learning curve even compared to OpenGL. All while not sacrificing performance and expressiveness for more involved development. Vulkan meanwhile remains very inaccessible to many developers even with graphics backgrounds.
Let's not also forget that apple isn't an outlier for lockin, and actually are quite open. OpenCL, Clang, webgpu, swift etc are all very open and cross platform. Meanwhile even things like directx are locked to windows.
The real goal isn't lockin. It's providing the best API to developers to let them get in quickly while also optimizing for their hardware. Lockin is an unfortunate side effect but they're also completely succesful in meeting their actual goals.
That's an excuse, since the result is lock-in. I.e. if Apple so much wanted Metal - let them have it. But how does that prevent them from supporting Vulkan, for those who don't want to waste resources on duplicating work and want to reuse their existing Vulkan codebase on Apple systems? But no, Apple forces you to use Metal. So the claim that it's for developers' benefit won't fly. It's for Apple's benefit very clearly.
WebGPU is also a counter example, since Apple there try to prevent adoption of common formats like SPIR-V.
When it comes to sabotaging interoperability, Apple are always among the first.
Why support Vulkan, which is arguably harder to use and takes more resources of their internal development teams, when they have an API that provides all the benefits and is arguably a better API? Especially when the major off the shelf engines already support metal. It's diminishing returns at this point.
Personally I'd be quite happy to have Vulkan support on mac, but if you take a step back from your inalienable position that it's a conspiracy, there's actually very sound reasoning behind it.
You may not agree with the decision, but you weaken your argument when you're trying to force everything to fit a black and white narrative. The reality is much more nuanced.
How does this jibe with your position that Apple isn't performing lock-in, particularly when Apple is now specifically refusing to approve previously-available Nvidia drivers and thereby preventing them from being used in external GPUs for Macs?
I don't classify that as lock in. It's an unfortunate side effect of business dealings between two immovable companies.
However apple does work with AMD and Intel GPUs, and still allow AMD external GPUs.
Not OP but the games and film industry believe this here is the problem. The additional effort to support common APIs is an artificial self-imposed problem resulting in worse software.
But on the flip side, it does fit in with apples ability to develop very tailored platforms and make very easy to use APIs.
So while I often find myself on the wrong side of the double edged sword, I do also feel their decisions make sense as well. And honestly, having done dx9-12, OpenGL and Vulkan, I won't argue against how easy to use metal is.
As for games, the sales speak for themselves.
First of all, who exactly prevents GPU vendors from doing it for Apple? Apple. Secondly, with Apple's resources I don't buy the excuse of "it's too hard" or "we can't spend on it". Apple are very happily spending piles of money, when it helps them hamper interoperability in result. So being cheap here is just another lame excuse for lock-in.
Whether you agree or not with the policy, it's not one motivated by lock in.
And again it's not a matter of being cheap. It's a matter of perspective. Apple believe metal is worth using and that it delivers needed performance, optimization and features for their stack. Apple also believe in very straightforward developer stories within their own platform. Vulkan doesn't provide value above and beyond what metal does from apples perspective, and it complicates their developer story.
That's my point too - their perspective is lock-in. Not just in graphics APIs but in many things. So this issue falls into the common picture with many other similar ones.
I.e. Apple could easily implement it. They don't for political reasons, and I don't buy any lame excuses like "that's better for developers" and such.
But they have explicitly said in the past: they really prefer we not put cross platform apps on the App Store.
I don’t know why you won’t consider the odds that Apple is trying to hamper cross platform apps with Metal deliberately as a policy when they’ve specifically said that’s their strategic goal.
To the point that what Intel has contributed to WebGL 2.0 compute shaders implementation on Chrome might be thrown away, as Google now considers it needless in presence of WebGPU.
Which by the way is based on HLSL, just as Khronos is also finding out on their Vulkan PR efforts, is the favourite shading language among professional game devs.
Which is why Samsung and Google are the two biggest contributors to HLSL to SPIR-V compiler.
Usually what gets thrown by OEMs or FOSS devs looks more like sample apps, are OEM specific thus making the API not as portable as advertised, or feel short.
For example you can pinpoint specific pixels and trace back to which code lines from each shader were involved in rendering the pixel. Check the Metal debugging talk at WWDC 2019.
> Let's not also forget that apple isn't an outlier for lockin, and actually are quite open. OpenCL, Clang, webgpu, swift etc are all very open and cross platform.
OpenCL is deprecated on macOS, and hasn't been updated past OpenCL 1.2 (2011). It was killed in favour of Metal.
I hope that WebGPU is a good cross-platform API for GPU compute when the standard is finalized and implemented, but I've learned not to count my chickens before they hatch.
Metal might be many things, but lock-in isn't one of them. If you are happy with Vulkan then good for you - without Metal, Vulkan wouldn't even exist. It took Apple telling Khronos to GTFO for they to start working on Vulkan.
That's completely false. Apple only started the whole Metal effort because of Mantle, which was the origins of Vulkan. But being Apple, instead of collaborating and ending up in proposing things for Vulkan, they pushed for NIH lock-in.
> Lock-in" means that there are alternatives that you could use, but the vendor does not let you.
Which is exactly the case here. Take some project like Wine for example, that works on implementing Direct3D over Vulkan. That's the alternative they want to use, yet Apple prevents them, forcing them to either waste resources on implementing another path using Metal, or to go suboptimal route of extra translation. Who is to be blamed for it, but Apple?
> Metal might be many things, but lock-in isn't one of them.
It wouldn't be, if Vulkan was available as an alternative. But like you said yourself, lock-in happens when the the vendor does not let you use the alternatives. Who but Apple prevents native Vulkan support from appearing on their systems? So Metal is very clearly lock-in, according to your own statement.
1. Mantle was not originally being proposed as a "open" API as you are implying. A reading of the [original white paper](https://www.amd.com/Documents/Mantle_White_Paper.pdf) makes apparent that AMD was trying to leverage their game developer mind-share from the consoles by bringing it to desktops. Mantle was being proposed as an AMD GPU only API.
2. Metal was released 10 months after Mantle was announced (and 3 months after API docs surfaced). That's an extremely short timeline for a big company to go from zero to deciding to release a new graphics API, spec that API and it's shading language, write drivers and compilers for it, write developer tools, and author documentation. The timeline you're proposing simply doesn't make sense. Apple was clearly working on Metal long beforehand.
3. Vulkan, as an initiative, was reactionary to Apple's release of Metal, being that - up to that point - iOS and macOS were the largest OpenGL[ES] markets and Apple the only company commercially invested in OpenGL (OK, maybe not the only, but clearly Apple was the most influential Khronos member). By the summer of 2014, it was clear that Mantle - as an AMD only API - was not commercially viable. Thus, it was "donated" (so to speak) to Microsoft and Khronos to bootstrap DX12 and Vulkan development. (My understanding is that DX12 was already under development, but it's clear that the API shifted drastically in response to Mantle as evidence by the DX12 version 1.0 docs containing passages verbatim taken from the Mantle programming guide).
Please stop spreading false narratives in order to bolster your agenda.
Apple used the idea, but instead of eventually joining Vulkan group, pushed their NIH in their typical fashion.
This is not true.
Oh that’s right they only support direct3d.
Because tying an OS cycle to a standards body causes significant problems in terms of feature lag, validation, etc
Win32/UWP store sandbox does not support OpenGL ICDs, which is the mechanism used by Vulkan drivers on Windows.
The only thing from UWP that is dead is an UWP only store.
The store, now as a mix Win32/UWP sandbox and the ongoing replacement of Win32 legacy APIs by UWP ones is pretty much alive.
In fact React Native for Windows is being rewritten to use UWP APIs, using WinUI 3.0, which is also the official MFC replacement for C++ devs.
Win32 is the Carbon of Windows world, stuck in a Windows XP concept.
If you want to write Windows applications as if targeting Windows XP, then jump of joy. There are still Apple apps being written in Carbon and Linux is stuck on the UNIX ways of yore anyway.
Luddites also need to work anyway.
Working with caveman tooling just in the name of some greater good, not so much.
Maybe you should make a reflection why no one cares about such Quixotic endeavours, which remind me of soapbox speeches while the gaming industry just carries on business as usual.
I just like to explain how the gaming industry works to those without any real experience on how it works.
It was my OpenGL and Linux blindness zealotry that costed me a few interviews at well known AAA studios, back when I still cared for making my mark in the industry.
Still, those days left me quite a few friends that I still keep in touch with, and I got to learn what the industry actually cares about.
Producing good IP to sell, using the best tools available, with support from platform owners, and ensuring good deals with publishers, eventually even movies and board games from titles.
Everything else are just windmills.
Now, whatever anyone learns from my comments or decides to carry on advocating practices that the industry doesn't care one second about it, it up to themselves to decide.
Seeking is another example. It's a hard requirement for video editing, and desirable for users but often compromised for more preferable things like bandwidth and file size. For example, if the data-rate is variable, you don't really know where 3minutes 20seconds into the file is without hunting around (which is trivial if the data-rate is constant). MP3 supports a 1-100% lookup table at the front of the file, but this isn't very granular for long files. Even if you can find the spot in the file, you'll probably snap to an i-frame unless you decode the whole segment.
I'm sure these things will get better as codecs mature and constraints on size and processing power ease up.
With Apple adopting Vulkan, it may actually stand a chance against DirectX and the majority of game developers might start developing for Vulkan first. And Apple would benefit greatly from that, just like every other Vulkan supporter would.
”Metal has been available since June 2, 2014 on iOS devices powered by Apple A7 or later”
”The Khronos Group began a project to create a next generation graphics API in July 2014”
Of course, Apple could have changed direction later on, but they must have had a large investment in Metal by the time it became clear Vulkan would become a long term thing.
”OpenCL is an open standard maintained by the non-profit technology consortium Khronos Group.”
And yes, it started life that way. https://en.wikipedia.org/wiki/OpenCL#History:
”OpenCL was initially developed by Apple Inc., which holds trademark rights, and refined into an initial proposal in collaboration with technical teams at AMD, IBM, Qualcomm, Intel, and Nvidia. Apple submitted this initial proposal to the Khronos Group. On June 16, 2008, the Khronos Compute Working Group was formed with representatives from CPU, GPU, embedded-processor, and software companies. This group worked for five months to finish the technical details of the specification for OpenCL 1.0 by November 18, 2008. This technical specification was reviewed by the Khronos members and approved for public release on December 8, 2008.”
Apple first shipped OpenCL in August, 2009.
So, OpenCL may be ill-fated, but I don’t see why Apple would have to have gone with CUDA, which is Nvidia-exclusive, both in actual hardware, and, AFAIK, license-wise.
Vulkan is not designed to be used by game developers directly but rather as a basis for games engines like Unreal or Unity. So I don't see how game developers would benefit from its widespread support as the majority of game developers will never have to deal with it directly.
That said Vulkan is an unmitigated disaster, though less so than classic OpenGL. Any API which fiddles with void* in 2019 should be put right back in a box. Security is mentioned exactly twice in the entire spec. Type-safety is mentioned twice also. And that is in a spec which is 900 pages long and incredibly complex.
Vulkan has significant benefits even if you're not writing Unreal or Unity. One of the biggest is that it removes a lot of the heuristics and guesswork that OpenGL drivers do (e.g. with regards to when to move things in and out of GPU memory) that cause a lot of the bugs and incompatibilities on different IHVs/cards/platforms. Its validation layers also leave the halfhearted, vendor specific debugging extensions in the dust.
> That said Vulkan is an unmitigated disaster, though less so than classic OpenGL. Any API which fiddles with void* in 2019 should be put right back in a box. Security is mentioned exactly twice in the entire spec. Type-safety is mentioned twice also. And that is in a spec which is 900 pages long and incredibly complex.
Metal overtly has statically checked memory safety via ARC, but the reality is that the IHV libraries will segfault in response to semantic mistakes, just like Vulkan. A big difference is that Vulkan has cross-IHV validation layers that catch most of these mistakes during development, and they're only getting more comprehensive. It's totally trivial to write a wrapper over Vulkan that fixes the type/memory safety of the C interface; it's not trivial to create a validation system of anywhere near the quality of Vulkan's for Metal.
OK are you a graphics professional? Have you written renderers in Vulkan? Do you have any idea of what you're talking about? What "void*" pointers are you referring to? Are you aware that type-safety is very much a design goal of the API? Are you aware that the spec ships with a formal memory model which is a godsend for graphics engineers that had to deal with implicit guarantees in other APIs for years? I'm not someone that authored the original spec, but reading your comment is somewhat rage-inducing given how off-base it is.
Vulkan, plain old C style API, full of extensions just like OpenGL, leading to several code paths, just the bare bones pixel drawing, go fish for random libraries for anything else, try your luck with RenderDoc or GPU specific debuggers, enjoy Notepad++ + UNIX shell style tooling support.
I mean be real...
there is no way that any programmer who actually used Vulkan would find it as pleasant to work with as you imply in your comment.
Clicking a bit around, gives the Vulkan support version per device, which on Android is a mess, unless one only cares about flagship devices.
Now regarding the tooling, since I am spreading disinformation, can you please provide us with the SDK tooling that matches the offerings from Apple, Sony, Nintendo and Microsoft, regarding their own APIs?
Because what LunarG offers is pretty bare bones, and the OEM SDKs pretty much just provide the basic stuff as well, with C samples.
I guess that someone that rather goes hunting for glm, uses sbt for textures, writes their own font rendering engine, compiles shaders from the command line, only knows about RenderDoc is capable of,... will feel very uncomfortable with the available set of Metal tooling and Frameworks.
And this is one of the best tutorials available for Vulkan beginners, https://vulkan-tutorial.com
You're definitely right about significant parts of the toolchain being weaker. In particular sorting out how glslang -> Vulkan works in practice is pretty trial-and-error, and if you want to use HLSL it's even more poorly documented. You have to expect to be going through the Vulkan spec (which I will say is much easier than directly using the OpenGL spec). However the Vulkan validation layers are incredible, and leave the equivalents for Metal, DirectX, and especially OpenGL in the dust.
I think it's just a matter of not having had much experience with it. It is natural to look at the shape of the API and have PTSD about wrestling with OpenGL for the past few decades.
I believe the stated strategy is to let third party middleware handle the higher level abstractions so that different approaches that appeal to different people can coexist. This also theoretically reduces driver complexity and thus (hopefully) bugs.
I have absolutely no idea if this is actually a good idea, or if it's working out in practice. In case anyone wants to poke around the ecosystem: (https://github.com/vinjn/awesome-vulkan).
So what made Metal a better technical choice than Vulkan, back when the options were "Metal without Apple's support built yet" and "Vulkan without Apple's support built yet"?
Oh god I hope not. I come from the API mess that was OpenGL over 3 major versions, and I was hoping all the lessons learned from that were applied to Vulkan.
Graphics APIs are not good when designed by committee.
The same devs that rather use DirectX, libGCM, libGNM, GX, GX2, NVN.
My point was I am surprised others do not care about this aspect, you are obviously one example - So my question to you (as someone who values it technically) is: does this not bother you?
Not at all, as someone that learned to program graphics when demoscene was all the rage, it is all about taking advantage of the hardware.
Professional game studios are more than used to have a thin layer to abstract each 3D API, which is a very small codebase from any game engine/middleware.
Ok, but the technical merits for metal stop at Apple, you can abstract away differences in your translation layer if you care about your game existing outside, but you have to leave any merits of metal behind. Doesn't this dull your enthusiasm over improvements and features specific to metal?
I get that the original demoscene you were using unique hardware, and unportable demos that squeezed everything they could out of that specific piece of hardware felt natural, but Apple computers use the same GPUs everyone else is using... doesn't that make a proprietary low level graphics API seem more artificial.
Many game studios are quite happy being Apple experts, just like many other game studios release exclusives or sell themselves as experts on a given platform, including selling consulting services.
For those, vendor tooling is very much appreciated.
The ones that care for portable code, they also care about having the easiest way to start coding on each platform.
If Khronos cares about adoption, they should improve LunarG SDK to be more than just a set of bare bones libraries.
Metal predates Vulkan by years. They were already using Metal in shipping products before Vulkan existed.
Unlike Vulkan, the lowest-level, C-ABI, non-type-safe parts of Metal aren't exposed as public APIs, AFAIK. You could maybe standardize those, but Apple presumably wants to reserve the right to change them while just keeping the higher-level ObjC ABI stable.
They don't even really exist. Most Metal APIs are defined as protocols (id<MTL...>) for a reason; if you look at the objects you get back, they're directly implemented by the GPU driver.
Apple was the first to release next-gen 3D API, Metal was released in 2014. Then came MS, DX12 was launched with Win10 in 2015. Vulkan was too late, initial release in 2016.
It was done exactly for the Apple to be "first". The initial Vulkan release was more comprehensive than Metal 2 in 2017.
Nowhere was mentioned, that Metal 1 and Vulkan 1 were not comparable by a long shot. Exacly, precisely because it was MVP focusing on specific mobile GPU.
So. What about Mantle?
(Note: I in no way imply that you spread false narrative etc. It just happens that this linked comment is such a reply)
I don't see anything wrong with it. Just like Windows did't adopt Vulkan. And that is assuming Vulkan is good in the first place.
And most of the gaming development are now done with Middlewares like Unity and Unreal. The way I see it, more and more people will develop with Middlewares in mind, those API won't be touched by a shrinking amount of developers.
DirectX 12 is the easiest of these APIs to use, and it's not exactly fun.
Even on Windows, you need from get the drivers from OEMs, and they only work in old Win32 desktop mode, not on store/UWP.
It remains to be seen if Windows sandbox will allow for anything else other than DirectX.
Linux distributions and the more recent android versions?
Yet still they feel the need to re-invent the wheel and write an API for it. I guess they really want to maintain that competitive moat.
Is not realtime. You could find an article on raytracing and code something in a weekend. Granted, POV-Ray is vastly more complex than a toy raytracer, but it is not realtime. It takes minutes to hours to render a single frame.
"Computers have been around for years, punch-card mainframes have been great at universities for decades even."
NVidia are, currently, the only vendor who have dedicated silicon for it (AMD have demonstrated DXRT working with existing silicon).
They do a actually have a secret sauce.
Nobody is, DXRT is a specification that any vendor is free to choose how they implement. NVidia are the only vendor who currently implement it.
Metal is Apple's realtime API, and seeing as DirectX doesn't run on Macs, they'll need an API for raytracing in order to take advantage of ray tracing hardware, just as Vulkan did.
Probably first in the thinnest of Macbooks as a way to test the waters and buy some more time.
The same way GPUs had dedicated logic for rasterisation to make that super fast (hierarchical z-buffering, interpolation and blending), now they have some for ray tracing.
Raytracing is a not a problem that is well suited to GPUs since there are lots of data dependencies, which means parallelism is severely limited.
This is a joke right? I mean ray tracing is the most common example pointed at as being highly amenable to parallel computation. all ray computations are independent (i.e cores), all scene and BDRF data are shared - this matches GPU architecture perfectly, the only reason it's more of a recent trend is because even with parallel compute it's still demanding for real time performance.
If you don't believe me you can go to shadertoy right now and see endless demos doing raycasting and pathtracing in a quad.
Which makes it ill-suited to GPUs since they want sibling threads to take the same execution path on cache coherent data. Better than a quad core CPU sure but a very small fraction of the performance they're otherwise capable of.
You can see this with the DXR performance on Pascal vs. Turing.
Nobody in this thread or anywhere else said there was.
> Raytracing is a not a problem that is well suited to GPUs since there are lots of data dependencies, which means parallelism is severely limited.
...no it's the classic example of an embarrassingly parallel problem - that's literally the term people use because it's so easy to parallelise. Each pixel is completely independent with no data or control dependency between them and they can be rendered in parallel.
However, each machine will be executing entirely different instructions after a very short period - there's not much "coherency" between adjacent rays, because all it takes is to clip the corner of an object and suddenly you're bouncing around a completely different part of the scene. This is a difficulty for GPUs, which are not true parallel clusters. What they do well is running the same set of calculations on different data, at the same time - in other words, not raytracing. I believe this is what the parent meant by "data dependency" - there are a lot of divergent branches, and the calculations that you do depend entirely on scene data.
Intel's Larrabee architecture would have made GPUs behave like genuine clusters. I think it's a bit sad we don't have general-purpose clusters in our machines, just the hobbled GPUs.
Even in path tracers that aren't using the GPU, one of the relatively recent huge improvements was "ray sorting", which tries to collect rays into bundles that use the same shader and roughly the same area of textures to improve on cache behavior. It brought huge speed increases.
One of the big limitations of NVIDIA's RTX right now is that it does not support ray sorting.
But there wasn't enough interest in GPU path tracing yet.
Pathtracing software has been available for production use on GPUs for years before RTX was available.
Even in games, raytracing has been in use for a long time in various forms.
Yes RTX enables extra optimizations and provides nice APIs for it to boot, but it doesn't enable the technology as a whole. It's very much existed in realtime for a long time and on GPUs for a long time as well.
The real coup if anything is denoising. Advances in denoising are actually what really push realtime pathtracing forward as you no longer need to fire as many rays to converge on a useable image.
And raytracing is a problem that is well-suited to GPU acceleration...ray calculations can be easily run in parallel and distributed.