Writing postprocessing effects in Vulkan
In the previous recipes of this chapter, we learned about some popular image-based postprocessing effects and how to implement them in OpenGL. Now, we can focus on the Vulkan API to approach one solution to a similar problem.
In this recipe, we use the Renderer
class from the Working with rendering passes recipe from the previous chapter, Chapter 7, Graphics Rendering Pipeline, to wrap a sequence of rendering operations in a single composite item. A helper class to perform fullscreen per-pixel image processing is also presented here.
Getting ready...
Make sure you read the previous OpenGL-related recipes in this chapter as they focus on the algorithm flow, and from this point on, we will be focused on the Vulkan API details and how to wrap them in a manageable way.
How to do it...
Most of the effects in this chapter use a number of rendering passes to calculate the output image. The CompositeRenderer
class is a collection of renderers...