Review: Vulkan Cookbook: Solutions to next gen 3D graphics API by Pawel Lapinski

So, as of this writing, I have read all 5 books available on Amazon on the Vulkan API and I would say that Vulkan Cookbook is one of the better resources out there. The format of the book is similar to other “cookbooks” you may have seen, with each recipe essentially describing one technique in a stand-alone fashion. Meaning the steps for each one will list fundamentals, like creating a logical device and all the other prerequisites, so you can easily refer back to one chapter when it’s time to implement a particular feature. I would personally recommend reading the text from front-to-back, as I think it’s a better way to learn, but you could certainly jump around and still not miss much (assuming you already have some understanding of Vulkan). Author Pawel Lapinski does a great job of showing real code for each recipe and only shows what is actually necessary for a technique. Unlike some other books, this isn’t a dry listing of the API documentation, rather the author shows practical usage of the API with some brief explanation. For this type of text, I think this works great and I imagine it would be very helpful to refer back to when it comes time to implement into your project.

Among the chapters, Lapinski covers: instances and devices, image presentation, command buffers and synchronization, resources and memory, descriptor sets, render passes and framebuffers, shaders, graphics and compute pipelines, command recording and drawing, along with some additional chapters at the end for more general graphics programming concepts like loading textures and 3d models, lighting and shadowing, and cubemapping. Each chapter itself is then broken down into smaller recipes, that could be something like “enumerating available physical devices” to “submitting a command buffer to a queue”. This is really quite a good mix of topics, and, at 700 pages, adequate coverage is given to the most commonly used parts of the Vulkan API. Having already worked through some tutorials online, and read a few other books on Vulkan, most of the topics here were things I had some familiarity toward already, but I still found the reading helpful.

Due to the tactical nature of the text, I would recommend the book for more intermediate to advanced programmers. While the author does a great job of explaining the specific steps needed to do particular actions in Vulkan, it may be helpful to at least understand some of the big picture before diving in here. I might even say this is the best book on the market today for Vulkan, though I’d probably also recommend reading it after one of the others available. It may be helpful to start with a Hello World type app in Vulkan, in which case you could first follow theĀ awesome tutorial over at vulkan-tutorial.com, or get Kenwright’s Vulkan Graphics API: in 20 Minutes, which was a little rough but still a cheap and quick way to obtain an overview of the API. For beginners, or maybe people that want to start at a more basic level, Introduction to Computer Graphics and the Vulkan API (also by Kenwright) may be a more comfortable spot to jump in at. And the other books out there were good in their own right, though some of them didn’t move past simple function/structure documentation.

One thing I really wish is that someone could make a Vulkan book on the level of Frank Luna’s DirectX series. Luna is able to show many practical graphics programming techniques in one book, and in the end you’ll have a handful of pretty sweet demos to showcase. Though Kenwright attempts this, I still haven’t seen this really accomplished yet for Vulkan. While the end chapters of Vulkan Cookbook do dip into this territory with shadow mapping and post processing, it would be nice to see an entire book written like this. However, given that Vulkan is a relatively new API, it’s probably more useful to start with the basics, and hope that competent readers can port techniques from other APIs once they have a feeling for how things work.

Keep in mind, Vulkan is an advanced and complex topic, and a single book won’t teach you everything you need to know. While many of the Vulkan books out today have seemed to release to mixed reviews, I feel that all of them have been helpful. Even reading the same topics explained by different authors can help with knowledge understanding and retention. And there are also some unique things in each book, so I would fully recommend reading them all if you’re really serious about getting into Vulkan. I realize there are some advanced coders that can study the documentation and hit the ground running, but I find the “guided tour” offered from books to be more conducive to learning for me personally. Your opinion my differ, but I’d have to say that you can’t really go wrong with Vulkan Cookbook by Pawel Lapinski. Recommended.