Library / SDK
PacktPublishing/3D-Graphics-Rendering-Cookbook-Second-Edition avatar
PacktPublishing/3D-Graphics-Rendering-Cookbook-Second-Edition

The Vulkan Rendering Cookbook ships ten chapters of runnable C++ demos

3D-Graphics-Rendering-Cookbook, Second Edition

626 stars66 forksC++MIT

At a glance

What is it?
Packt's 3D-Graphics-Rendering-Cookbook-Second-Edition repository holds the code for the Vulkan 3D Graphics Rendering Cookbook, organised one folder per chapter and demo, from a CMake and GLFW setup through bindless rendering and a physically based glTF2 pipeline. It is a teaching codebase with real dependencies, and it needs a Vulkan 1.3 card to run.
Who is it for?
Adopt this repository if you are working through the book or want a set of small, readable Vulkan applications that isolate one technique each, since the demo-per-topic structure makes it easy to copy a single idea rather than reverse-engineer a large engine. Skip it if you need a maintained engine, a framework or asset pipeline you can build on, because nothing here is packaged for that, and skip it if you do not have a Vulkan 1.3 capable GPU.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 31 days ago.
What is it written in?
Mainly C++, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

Editorial analysis

A book repository with ten chapters of demos

This is the code repository for Vulkan 3D Graphics Rendering Cookbook, Second Edition, published by Packt in 2025, written by Sergey Kosarevsky, Viktor Latypov and Alexey Medvedev. The README describes it as a comprehensive guide to exploring rendering algorithms in modern Vulkan, and the repository itself is organised the way the book is. The top level holds Chapter01 through Chapter11 directories, plus shared/, deps/, data/, CMake/, and a .build/ directory that already contains a configured CMake tree. The organising principle is that each chapter contains a small number of demos, and each demo is self-contained. Chapter 1 establishes a build environment with demos for CMake, GLFW, Taskflow, GLSL compilation and BC7 compression. Chapter 2 gets into Vulkan itself with a swapchain, a hello triangle and a GLM. Chapter 3 works with Vulkan objects through Assimp and STB. That granularity is the reason the repository is worth having even if you never buy the book, because a demo that isolates one idea, such as a million cubes or a compute-generated texture, is a far better reference than a slice of a large engine.

The build needs CMake, a compiler and the Vulkan SDK

The software and hardware list in the README is specific enough to plan a machine. For chapters 1 to 10 you need Microsoft Visual Studio 2022 on Windows or GCC 13 on Linux, Python 3.x on either, and the Vulkan SDK. The Linux build is four commands once the dependencies are in place.

code
sudo apt update
sudo apt install libtbb-dev
cd .build 
cmake ..
cmake --build .
cd ..

The Windows path opens a generated Visual Studio solution instead.

code
cd .build 
cmake .. -G "Visual Studio 17 2022" -A x64
start RenderingCookbook2.sln

The TBB package on Linux is the one dependency that stands out, since Intel Threading Building Blocks is what the Taskflow and job system demos in chapter 1 sit on. On the hardware side the code runs on graphics cards which support Vulkan 1.3, and a GeForce RTX 2060 or newer is strongly recommended. That is a real constraint on adoption, because a book about modern rendering that requires a discrete recent card rules out the integrated graphics most laptops and cloud instances have. The demos also need to be run from the root folder of the repository rather than from the build output, which the README calls out in emphatic terms, and the assets are fetched separately.

Git LFS and 15 gigabytes of assets before you compile

The dependency step comes before the build and it is the part that catches people out. Git LFS must be installed first, because the repository handles large files through it, and then the deploy_deps.py script is run from the root folder of the repository to download the assets and build the source. The instruction is to make sure you have around 15 GB of free space before you do that, which is a large download for what is a book repository. The models themselves come from Morgan McGuire's Computer Graphics Archive, a well-known source of test assets in graphics research, so the visual output of the demos is built on standard, redistributable models rather than on anything bespoke to the book. The practical implication is that a first run is not a quick exercise. You are pulling gigabytes of textures and meshes before a single window opens, which means the code is not something you can try casually between other work, and it is another reason to check the disk and the network before starting.

The topics run from geometry to bindless to physical shading

The feature list in the README sets out the arc. It covers improving the performance of legacy Vulkan applications with Vulkan 1.3, managing a substantial amount of content in real-time rendering engines, discovering how to debug and profile graphics applications, understanding and leveraging the bindless approach in Vulkan, integrating various rendering techniques into a single application, and implementing a physically based glTF2 rendering pipeline from scratch. The chapter listings show how that maps to code. Chapter 4 adds productivity tooling with ImGui, the Tracy profiler and an FPS counter, plus a cube map, a camera and a combined demo application. Chapter 5 is the geometry chapter, with a mesh optimizer, vertex pulling, a million cubes, instanced meshes, a grid, tessellation, a mesh renderer, and two compute demos generating a texture and a mesh. Chapter 6 is the physically based rendering chapter using the glTF 2.0 shading model, starting from an unlit baseline through a BRDF lookup table, an environment map prefilter, and the metallic-roughness and specular-glossiness workflows, with chapter 7 extending that with clearcoat and sheen. The book uses the LightweightVK library as a Vulkan wrapper and dives deep into its implementation, which is the thread that holds the demos together.

LightweightVK is the abstraction the demos are built on

The most consequential sentence for a developer reading this repository is that the book uses LightweightVK as a Vulkan wrapper and dives deep into its implementation. Vulkan's raw API is famously verbose, and a book that taught the raw API would spend most of its pages on boilerplate. Wrapping it in a small library means the chapters can talk about rendering algorithms instead of command buffer plumbing, and the reader is spared the parts of Vulkan that are not the subject. The cost is that the examples are not a template for a project that will use raw Vulkan or another wrapper, and the wrapper's own design decisions become invisible unless you go read that library, which the README does point you to. For a reader who already knows the raw API, that is a reasonable trade. For someone whose goal is to write production Vulkan code, the demos are a study of rendering technique rather than a starting point, and the book says so, describing its audience as 3D graphics developers familiar with the mathematical fundamentals of 3D rendering who want expertise in writing fast rendering engines with advanced techniques using C++ libraries and APIs, and requiring a solid understanding of C++ and basic linear algebra plus experience creating custom 3D applications without premade rendering engines.

Where this repository is the wrong tool

Three limits. The first is that it is tied to a book. The demos are indexed by chapter, and the README's own list of what the book covers is the list of what the code covers, so if your interest is a technique the book does not treat, there is nothing here for you, and if you want a different order of learning, the structure works against you. The second is the size of the setup for what you get. Fifteen gigabytes of assets, a Vulkan SDK, a specific compiler, and a card from the last few years, for code whose value is instructive rather than reusable. There is no package to add to a project, no supported API, and no compatibility promise, so any code you take from here is code you own and maintain, with the MIT licence making that easy from a licensing standpoint but not a shortcut from an engineering one. The third is that some of the content ages faster than the rest. The book was published in 2025, and the release history in the repository is slow and dated, with 1.0.3 in June 2025, 1.0.4 in December 2025 and 1.0.5 in January 2026, and the last push to the repository was on 2026-09-22. Vulkan has moved on, so treat the code as a well-made snapshot of one moment rather than a current reference.

Editorial conclusion

Adopt this repository if you are working through the book or want a set of small, readable Vulkan applications that isolate one technique each, since the demo-per-topic structure makes it easy to copy a single idea rather than reverse-engineer a large engine. Skip it if you need a maintained engine, a framework or asset pipeline you can build on, because nothing here is packaged for that, and skip it if you do not have a Vulkan 1.3 capable GPU. Before your first build, install Git LFS, run deploy_deps.py from the root of the repository, and leave around 15 GB of free space for the downloaded assets, then build from the .build directory as the instructions describe.

Frequently asked questions

What do I need to build the Vulkan 3D Graphics Rendering Cookbook code?

For chapters 1 to 10 you need Microsoft Visual Studio 2022 on Windows or GCC 13 on Linux, Python 3.x, the Vulkan SDK and Git LFS, and you should have about 15 GB of free space before running deploy_deps.py. The code runs on cards supporting Vulkan 1.3, with an RTX 2060 or newer strongly recommended.

How do I build the cookbook demos on Linux?

Update the package index, install libtbb-dev, then from the .build directory run cmake .. and cmake --build . and return to the repository root. On Windows the equivalent generates a Visual Studio 2022 solution named RenderingCookbook2.sln that you open with start.

What topics do the demos in this repository cover?

Chapter 1 sets up the build environment with CMake, GLFW, Taskflow, GLSL and BC7 compression, chapter 2 covers the swapchain, hello triangle and GLM, chapter 3 works with Assimp and STB, chapter 4 adds ImGui, Tracy profiling, an FPS counter and a camera, chapter 5 is geometry including a million cubes, instanced meshes, tessellation and compute demos, and chapter 6 implements physically based rendering with the glTF 2.0 shading model.

Which library do the demos use for Vulkan?

The book uses the LightweightVK library as a Vulkan wrapper and dives deep into its implementation, which is what lets the demos focus on rendering algorithms rather than raw Vulkan boilerplate. The repository is MIT licensed, and the recent versions are 1.0.5 from 2026-01-11 with the last push on 2026-09-22.

Official sources

  1. Issues
  2. License: MIT
  3. PacktPublishing/3D-Graphics-Rendering-Cookbook-Second-Edition on GitHub
  4. README
  5. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/packtpublishing-3d-graphics-rendering-cookbook-second-edition.svg)](https://hysenlabs.com/projects/packtpublishing-3d-graphics-rendering-cookbook-second-edition)