All Projects → PacktPublishing → Vulkan Cookbook

PacktPublishing / Vulkan Cookbook

Licence: mit
Code repository for Vulkan Cookbook by Packt

Programming Languages

cpp
1120 projects

Projects that are alternatives of or similar to Vulkan Cookbook

quake bsp vulkan
Quake BSP renderer written in C++ and Vulkan
Stars: ✭ 76 (-82.81%)
Mutual labels:  vulkan, vulkan-api
VulkanResources
A list of resources for learning Vulkan
Stars: ✭ 50 (-88.69%)
Mutual labels:  vulkan, vulkan-api
Vulkan
Vulkan module for Jai
Stars: ✭ 23 (-94.8%)
Mutual labels:  vulkan, vulkan-api
Vulkan.NET
This repository contains low-level bindings for Vulkan used in Evergine.
Stars: ✭ 119 (-73.08%)
Mutual labels:  vulkan, vulkan-api
Pumex
Vulkan library oriented on high speed rendering
Stars: ✭ 259 (-41.4%)
Mutual labels:  vulkan, vulkan-api
Vortice.Vulkan
Cross platform .NET bindings for Vulkan, VMA, SPIRV-Cross and shaderc
Stars: ✭ 172 (-61.09%)
Mutual labels:  vulkan, vulkan-api
magma
Abstraction layer to facilitate usage of Khronos Vulkan API
Stars: ✭ 23 (-94.8%)
Mutual labels:  vulkan, vulkan-api
Vulkano
Safe and rich Rust wrapper around the Vulkan API
Stars: ✭ 2,950 (+567.42%)
Mutual labels:  vulkan, vulkan-api
SFE-Engine
A real time renderer based on Vulkan(LWJGL).
Stars: ✭ 20 (-95.48%)
Mutual labels:  vulkan, vulkan-api
makma
Makma is a deferred Vulkan renderer written in C++.
Stars: ✭ 77 (-82.58%)
Mutual labels:  vulkan, vulkan-api
RTX-Mesh-Shaders
Different mesh shading techniques using the NVIDIA RTX (Turing) technology.
Stars: ✭ 84 (-81%)
Mutual labels:  vulkan, vulkan-api
Liblava
🌋 A modern and easy-to-use library for the Vulkan API
Stars: ✭ 275 (-37.78%)
Mutual labels:  vulkan, vulkan-api
vkel
Simple Dynamic Vulkan Extension Loader
Stars: ✭ 39 (-91.18%)
Mutual labels:  vulkan, vulkan-api
racket-vulkan
Racket integration with all things Vulkan 💥
Stars: ✭ 40 (-90.95%)
Mutual labels:  vulkan, vulkan-api
clustered forward demo vk
Clustered forward rendering demo with Vulkan
Stars: ✭ 50 (-88.69%)
Mutual labels:  vulkan, vulkan-api
framework
The exomia/framework is used for building 2D and 3D games and more inspired by the XNA/Mono framework.
Stars: ✭ 21 (-95.25%)
Mutual labels:  vulkan, vulkan-api
Lugdunum
[UNMAINTAINED] A modern cross-platform 3D engine built with Vulkan, glTF 2.0 and modern C++14.
Stars: ✭ 230 (-47.96%)
Mutual labels:  vulkan, vulkan-api
Wolf.engine
The Wolf is a comprehensive set of C/C++ open source libraries for realtime rendering, realtime streaming and game developing
Stars: ✭ 230 (-47.96%)
Mutual labels:  vulkan, vulkan-api
Yggdrasil-Legacy
Experimental Vulkan Renderer / Game Engine written in C++20.
Stars: ✭ 20 (-95.48%)
Mutual labels:  vulkan, vulkan-api
Diligentcore
Core functionality of Diligent Engine
Stars: ✭ 263 (-40.5%)
Mutual labels:  vulkan, vulkan-api

Vulkan Cookbook

This is the code repository for Vulkan Cookbook, published by Packt. All the example workflows that are mentioned in the book are present in the package.

About the 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, programmable 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.

Related Books

Suggestions and Feedback

Click here if you have any feedback or suggestions.


Credits

Special thanks for authors and developers of the following projects and resources:

  • tinyobjloader - A single-header library for loading Wavefront OBJ files.
  • stb image - A single-header library for loading image files (other libraries are also available).
  • Humus - A large collection of cubemaps (and other resources).

Please note!

Currently only Windows operating system is supported. Linux version is being prepared and should be ready soon.


Samples

Chapter 11 - Lighting

Sample showing how to implement a diffuse lighting algorithm calculated only at geometry's verices using vertex shaders.
Left mouse button: rotate the scene

This sample present the Phong specular lighting algorithm implemented on vertex and fragment shaders.
Left mouse button: rotate the scene

Here a normal mapping technique is presented and the model is lit using the specular lighting algorithm.
Left mouse button: rotate the scene

Sample presenting how to use cubemaps to render a transparent geometry that both reflects and refracts environment.
Left mouse button: rotate the scene

In this sample a basic shadow mapping algorithm is shown. In the first render pass a shadow map is generated. In the second render pass a scene is rendered and the data from the shadow map is used to check, whether the geometry is lit or covered in shadow.
Left mouse button: rotate the scene
Right mouse button: move the light

Chapter 12 - Advanced Rendering Techniques

Here it is shown how to draw a skybox, which simulates background - objects seen in a distance and/or a sky.
Left mouse button: look around

This sample presents a way of drawing sprites or bilboards - flat, textured quads that are always facing the camera.
Left mouse button: rotate the scene

Here an example of rendering particles is shown. Compute shaders are used to calculate positions of all particles in the system. Particles are rendered as flat bilboards (sprites).
Left mouse button: rotate the scene

This code sample shows one of the ways to draw a terrain. A complete graphics pipeline with all five programmable stages is used that tessellates the terrain near the camera to improve its complexity, with level of details faiding away with increasing distance from the camera, and with a flat shading lighting algorithm.
Left mouse button: rotate the scene
Mouse wheel: zoom in / zoom out

Sample presenting a fast and easy way to prepare an image postprocessing phase in a graphics pipeline - by using a fullscreen quad drawn already in a clip space. An edge detection algorithm is shown as on of the examples of postprocessing techniques.

In this code another postprocessing technique is shown that uses one of the Vulkan's specific features - input attachments, which allow reading data from render targets (attachments) in the same render pass.
Left mouse button: rotate the scene

Other

Code sample that shows basic Vulkan setup - instance creation, physical device enumeration and logical device creation.

Here a swapchain object is created, which allows us to render a scene directly to an application's window.

This example shows how to preapre a basic render pass - a description of attachments (render targets) needed to render a geometry.

Sample showing how to create a graphics pipeline, setup its multiple parameters and use it to draw a scene.

Here descriptor sets are introduced. They are required to setup an interface between application and a pipeline and to provide images (textures) to shaders.

Another example of using descriptor sets, but this time it presented how to prepare transformation matrices and provide them to shaders.

This code sample presents a very fast and easy way to provide data to shaders - push constants. Though the provided data may not be too big, they are ideal for performing frequent updates.

Here we can see how to create a graphics pipeline with tessellation control and evaluation shaders enabled responsible for increasing the complexity of a rendered geometry.

Sample presenting how to use geometry shaders and generate new primitives instead of those drawn in an application.

This code sample shows how to create a compute pipeline - the second type of pipelines supported in the Vulkan API. It allows us to perform mathematical computations.

Here a commonly used debugging technique is presented that uses geometry shaders to display normal vectors provided by the application.

In this example we can see how to setup a render pass, framebufer and a graphics pipeline to use depth attachment and enable depth test during drawing.

This code sample shows how to enable alpha blending (transparency) in a graphics pipeline.
Left mouse button: disable/enable blending

This sample shows an alternative for performing a postprocessing with a quad (two triangles). Here a single triangle covering the whole screen is used to apply a grayscale effect.


Recipes Library

Chapter 01 - Instance and Devices

Chapter 02 - Image Presentation

Chapter 03 - Command Buffers and Synchronization

Chapter 04 - Resources and Memory

Chapter 05 - Descriptor Sets

Chapter 06 - Render Passes and Framebuffers

Chapter 08 - Graphics and Compute Pipelines

Chapter 09 - Command Recording and Drawing

Chapter 10 - Helper Recipes

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].