Book Image

Mastering Graphics Programming with Vulkan

By : Marco Castorina, Gabriel Sassone
Book Image

Mastering Graphics Programming with Vulkan

By: Marco Castorina, Gabriel Sassone

Overview of this book

Vulkan is now an established and flexible multi-platform graphics API. It has been adopted in many industries, including game development, medical imaging, movie productions, and media playback. Learning Vulkan is a foundational step to understanding how a modern graphics API works, both on desktop and mobile. In Mastering Graphics Programming with Vulkan, you’ll begin by developing the foundations of a rendering framework. You’ll learn how to leverage advanced Vulkan features to write a modern rendering engine. The chapters will cover how to automate resource binding and dependencies. You’ll then take advantage of GPU-driven rendering to scale the size of your scenes and finally, you’ll get familiar with ray tracing techniques that will improve the visual quality of your rendered image. By the end of this book, you’ll have a thorough understanding of the inner workings of a modern rendering engine and the graphics techniques employed to achieve state-of-the-art results. The framework developed in this book will be the starting point for all your future experiments.
Table of Contents (21 chapters)
Part 1: Foundations of a Modern Rendering Engine
Part 2: GPU-Driven Rendering
Part 3: Advanced Rendering Techniques


In this chapter, we improved our GPU device implementation to make it easier to manage a large number of textures with bindless resources. We explained which extensions are needed and detailed which changes are required when creating a descriptor set layout to allow the use of bindless resources. We then showed the changes needed when creating a descriptor set to update the array of textures in use.

We then added automatic pipeline layout generation by parsing the SPIR-V binaries generated by the glslang compiler for our shaders. We provided an overview of the SPIR-V binary data format and explained how to parse it to extract the resources bound to a shader, and how to use this information to create a pipeline layout.

Finally, we enhanced our pipeline creation API by adding pipeline caching to improve the load times of our applications after the first run. We presented the Vulkan APIs that are needed to either generate or load the pipeline cache data. We also explained...