Really nice article! I have some OpenGL familiarity and tried out Vulkan but bounced off of it due to all of the up-front complexity just getting something running. Might give it another shot now!
It's not quite as bad as it used to be, various later additions to Vulkan like dynamic rendering have eliminated some of the complexity it originally had. Figuring out which subset you should be using is a challenge in itself though, especially since there's a lot of outdated introductory resources floating around which still promote the ultra-verbose Vulkan 1.0 way of doing things. If a tutorial tells you to use render passes, run away.
Unfortunately, dynamic rendering didn't come about until "recently". Many devices are stuck on Vulkan 1.1. Go to http://vulkan.gpuinfo.org/listextensions.php and search for dynamic_rendering. It's only supported on about 28% of reports.
If you want to support those other devices you have to have a non-dynamic rendering path, and then at that point dynamic rendering is just more code. VK_EXT_shader_object is even better, but availability is that much worse.
Edit: If you are able to find a tutorial using dynamic rendering, learn with that. Render passes obfuscate what's going on, and with dynamic rendering you can see exactly what's happening.
This information is misleading because it includes old reports from years ago, before this feature existed. It does NOT mean that 28% of devices out there have support. You will need Steam hardware survey results and cross reference gpuinfo.org or Android hardware survey results which directly list Vulkan versions.
Dynamic rendering is available on all desktop GPUs (Intel, NV, AMD), on all desktop OSes (Windows, Macos, Linux) as long as you've got drivers that are up to date (no older than 2023).
For mobile devices, the situation isn't as good. Updating mobile GPU drivers is an unsolved problem.
I get your point. But you might be surprised how many PCs are still in use that have pre-Skylake Intel IGPs. Some people just don't update their drivers, either.
Pre-Skylake Intel never had proper Vulkan support (on Linux at least) so it's a non issue.
I use a 2015 Skylake laptop for most of my graphics programming project and it's got full Vulkan 1.3 and wide set of features. The hardware doesn't do mesh shaders or Ray tracing but apart from that every new feature is available.
Not updating drivers is a problem, especially on mobile. Thankfully auto updaters are very common these days.
You really have to think of Vulkan on PCs and Vulkan on mobile as separate things, if you only care about running on the former then you can easily count on things like dynamic rendering always being available as long as your users drivers are up to date. If you need to target Android though, my condolences.
Do you have any recommendations for sources? I’ve used Vulkan Tutorial, which is a bit stale but I suppose still good for exposure. I’ve also used Vulkan Guide, before its latest overhaul. That one was educational. Not sure if I’ll be able to do their new guide, my laptop can’t run some of the more recent versions of Vulkan
> Not sure if I’ll be able to do their new guide, my laptop can’t run some of the more recent versions of Vulkan
If your laptop got still GPU driver updates in 2022 or later, it should probably support Vulkan 1.3. You can install Vulkan SDK (or just extract the archive) and check your Vulkan version by running the supplied "vulkaninfo" program.
For example, my 5 year old Thinkpad T490 fully supports Vulkan 1.3 and it only has an iGPU! :)
Interesting, for a while the guidance for a while was to learn webgpu instead unless you needed all that extra control. Do you think these changes modify that guidance?
With WebGPU/wgpu you don't get mesh shaders, ray tracing or shader subgroup/wave/warp operations. Its feature set is comparable to Vulkan 1.0, and Vulkan has progressed a lot since.
And WebGPU still requires all the RenderPass setup code which is a lot of boilerplate that Vulkan no longer requires.
Subgroups may seem like a minor feature, but they can unlock huge performance. I recently had a 10x perf boost with a very basic subgroup trick to let neighboring pixels collaborate on some expensive operations in fragment shaders. And there's another 5x in there waiting for me to implement some subgroup quad tricks.
WebGPU (or Metal if you're in Apple land) still has a much gentler learning curve. The simplifications to Vulkan weren't really aimed at making it easier to use, just streamlining parts of the API which turned out to be needlessly complex, so the parts that are complex for a reason are still just as complex.
Aside from performance there's also just more hardware features exposed via Vulkan, as a sibling mentioned if you want to do anything with raytracing for example then you will have to graduate to Vulkan in order to take advantage of hardware acceleration.
Thank you. The up-front complexity is still there and it might take quite a few days to see your first triangle. But I promise, everything will get much easier from that point. :)
The thing I'm most interested in doing when starting a new project is pretty much never to spend a few weeks and writing 10-20k LOC to get a triangle on the screen, I think I'll stick with OpenGL for the time being tbh
You'll need 1k LOC to draw a single triangle and not 10-20k.
Sticking with OpenGL is understandable, but I can recommend learning some Vulkan as a side project (with the help of vkguide) without too much commitment. That's how I started and it turned out to be not as bad as I imagined! Uour mileage may vary, of course.