diff options
author | Frederico Linhares <fred@linhares.blue> | 2023-09-27 15:19:02 -0300 |
---|---|---|
committer | Frederico Linhares <fred@linhares.blue> | 2023-09-27 15:19:02 -0300 |
commit | 607255a8fd901da7a3d6dcdafe9c0585f8c81521 (patch) | |
tree | 2cc8b89cbe71ef13a447d9cec5647701e979753b /src/vk/graphics_pipeline_3d.cpp | |
parent | 25bf78bfb4785e2cbed683cc56d3cec4271d8b5a (diff) |
refa Remove redundant uniform buffer updates
* src/vk/graphics_pipeline_3d.cpp: Remove redundant uniform buffer
updates
* src/vk/renderer.cpp: Update world colors just once for each frame.
Diffstat (limited to 'src/vk/graphics_pipeline_3d.cpp')
-rw-r--r-- | src/vk/graphics_pipeline_3d.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/vk/graphics_pipeline_3d.cpp b/src/vk/graphics_pipeline_3d.cpp index 6639d99..355509e 100644 --- a/src/vk/graphics_pipeline_3d.cpp +++ b/src/vk/graphics_pipeline_3d.cpp @@ -625,19 +625,6 @@ GraphicsPipeline3D::draw( view->ub_3d[image_index].copy_data(&ubo_view_3d); } - - // TODO: Do not update this for each view. All views use the same data. - { // Update world uniform buffer - ODOWorld3D_Vert ubo_world_3d_vert{}; - ubo_world_3d_vert.ambient_light_color = glm::vec4{0.25, 0.25, 0.25, 1.0}; - this->ub_world_vert[image_index].copy_data(&ubo_world_3d_vert); - - ODOWorld3D_Frag ubo_world_3d_frag{}; - ubo_world_3d_frag.directional_light_direction = - glm::vec3{-0.57735, 0.57735, -0.57735}; - ubo_world_3d_frag.directional_light_color = glm::vec4{0.8, 0.8, 0.8, 1.0}; - this->ub_world_frag[image_index].copy_data(&ubo_world_3d_frag); - } } } |