What this book covers
This book is structured into distinct chapters, each focusing on a specific aspect of 3D rendering. As you progress, you’ll gradually build a set of versatile 3D graphics demos, starting with the fundamentals, then exploring more complex techniques, and finally incorporating advanced rendering methods into your code.
Chapter 1, Establishing a Build Environment, guides you through setting up a Vulkan 1.3 development environment. You’ll learn which tools and dependencies are needed to work with the book’s source code and how to configure them. This chapter also introduces essential Vulkan recipes, including compiling Vulkan shaders from GLSL at runtime.
Chapter 2, Getting Started with Vulkan, introduces the fundamental components of the Vulkan API, including instance and device creation, swapchain management, debugging setup, and command buffer usage. You’ll also learn how to create Vulkan rendering pipelines and explore a collection of recipes for quickly building minimal graphical applications from scratch using open-source libraries like GLFW, GLM, STB, and LightweightVK.
Chapter 3, Working with Vulkan Objects, explores handling various buffers and textures in Vulkan, as well as organizing a staging buffer. You’ll learn how to wrap low-level Vulkan objects into user-friendly abstractions and get introduced to descriptor indexing.
Chapter 4, Adding User Interaction and Productivity Tools, focuses on debugging, profiling, and user interaction mechanisms. You’ll learn various techniques for debugging and profiling graphical applications, starting with on-screen counters and graphs, then exploring open-source instrumenting profiler capabilities, and finally implementing helper classes for interactive application debugging.
Chapter 5, Working with Geometry Data, covers handling geometry in a modern 3D rendering pipeline and introduces concepts like Level-of-Detail (LOD) and tessellation. You’ll also explore GLSL techniques for implementing various utility functions for geometry rendering, and introduce you to Vulkan compute shaders.
Chapter 6, Physically Based Rendering Using the glTF 2.0 Shading Model, introduces the glTF 2.0 physically based shading model and its implementation using GLSL in Vulkan. You’ll explore various data preprocessing techniques, including the precalculation of Bidirectional Reflectance Distribution Function (BRDF) look-up tables and irradiance maps, with all necessary tooling built from scratch.
Chapter 7, Advanced PBR Extensions, explores advanced glTF PBR extensions from Khronos that extend the base metallic-roughness model. You’ll learn how to integrate each of these extensions into GLSL shader code.
Chapter 8, Graphics Rendering Pipeline, goes the representation of complex 3D scene data with multiple dependencies and cross-references. You’ll learn how to apply performance-oriented techniques, such as data-oriented design, to build a high-performance 3D rendering system. This chapter marks the beginning of real 3D engine design, demonstrating how to scale a scene graph approach to develop a practical graphics engine.
Chapter 9, glTF Animations, introduces a framework for supporting glTF animations in your rendering code. You’ll learn the fundamentals of node-based animations, skeletal animations, morph targets, and animation blending.
Chapter 10, Image-Based Techniques, presents a series of recipes for enhancing rendering realism using image-based techniques, such as screen space ambient occlusion, high dynamic range rendering with light adaptation, and projective shadow mapping.
Chapter 11, Advanced Rendering Techniques and Optimizations, dives deeper into constructing GPU-driven rendering pipelines, multi-threaded resources loading, and other advanced techniques for feature-rich graphics applications. The book concludes by integrating various recipes and techniques into a single application.