blurrypiano / littleVulkanEngine

Code repo for video tutorial series teaching Vulkan and computer graphics
MIT License
829 stars 147 forks source link

Tutorial 25 #26

Closed blurrypiano closed 2 years ago

blurrypiano commented 2 years ago

In this tutorial we add support for multiple point light objects in the scene. Lights will still be stored in the GlobalUbo, however for rendering the light objects we will use push constants.

With the simple implementation shown in the video, each light in the scene contributes to every fragment's lighting calculation. For this reason, I set a limit on the total number of lights possible. With a more complex implementation this limit can be increased significantly, but is beyond the scope of the material we have covered up to this point.

Light Colors Paste Bin Link https://pastebin.com/HJZXyBTi