Push Constants - Vulkan Game Engine Tutorial 09

Vulkan Push constants are an easy and performant way to pass data to a shader, via a vulkan command buffer rather than writes to memory or copy commands. They’re a great option for data that updates frequently, however have a main drawback of being limited in size. In this tutorial I provide an introduction to vulkan push constants and show a simple method for easily drawing multiple copies of an object as well as applying motion. ** WARNINGS ** Note that at 8:18 when I first run and get a red triangle, depending on your system you may get a crash. This demonstration is relying on undefined behaviour. Just keep going with the tutorial and adding alignas(16) will fix things. ** Timecodes ** 0:00 - intro to push constants 2:40 - define pushConstant struct and range 4:20 - write push constant data 5:50 - updating shader files 7:20 - auto-compile shader remarks 8:18 - Alignment Requirements 10:06 - Adding Motion 11:14 - pros vs. cons of push constants 12:18 - transformation matrices ** View File Changes ** https://github.com/blurrypiano/little... note: I messed up the commit message to say tutorial 8 rather than 9. The file changes are correct, but the title should say tutorial 9. ** View playlist **    • Vulkan Game Engine Tutorial   ** 3Blue1Browns Linear algebra series **    • Essence of linear algebra   ** Video topic resources (alignment requirements, push constants, ...) ** https://github.com/blurrypiano/little... ** Some other resources ** My github for this series - https://github.com/blurrypiano/little... Official vulkan samples - https://github.com/KhronosGroup/Vulka... “Vulkan and the Vulkan logo are registered trademarks of the Khronos Group Inc.”