Book Image

Vulkan Cookbook

By : Lapinski
Book Image

Vulkan Cookbook

By: Lapinski

Overview of this book

Vulkan is the next generation graphics API released by the Khronos group. It is expected to be the successor to OpenGL and OpenGL ES, which it shares some similarities with such as its cross-platform capabilities, programmed pipeline stages, or nomenclature. Vulkan is a low-level API that gives developers much more control over the hardware, but also adds new responsibilities such as explicit memory and resources management. With it, though, Vulkan is expected to be much faster. This book is your guide to understanding Vulkan through a series of recipes. We start off by teaching you how to create instances in Vulkan and choose the device on which operations will be performed. You will then explore more complex topics such as command buffers, resources and memory management, pipelines, GLSL shaders, render passes, and more. Gradually, the book moves on to teach you advanced rendering techniques, how to draw 3D scenes, and how to improve the performance of your applications. By the end of the book, you will be familiar with the latest advanced techniques implemented with the Vulkan API, which can be used on a wide range of platforms.
Table of Contents (13 chapters)

Using input attachments for a color correction post-process effect

There are many various post-process techniques used in 3D applications. Color correction is one of them. This is relatively simple, but it can give impressive results and greatly improve the look and feel of a rendered scene. Color correction can change the mood of the scene and induce the desired feelings for the users.

Usually, a color correction effect requires us to read data of a single, currently processed sample. Thanks to this property, we can implement this effect using input attachments. This allows us to perform post-processing inside the same render pass in which the whole scene is rendered, thus improving the performance of our application.

The following is an example of an image generated with this recipe:

How to do it...

...