aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-08-04 23:31:57 +0200
committerladevieq <ladevie.quentin@gmail.com>2021-08-04 23:31:57 +0200
commit3465afcc635184cf3a72e912ef9fc927099cc661 (patch)
tree3db2a7a1a2c3babe48b2eb251ac913ef3de2475a /src
parent80db03f7e6140e1b607dfaa09eeff91c36bc272c (diff)
Fix black borders
Diffstat (limited to 'src')
-rw-r--r--src/vk-renderer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vk-renderer.cpp b/src/vk-renderer.cpp
index 0c73337..f2dff62 100644
--- a/src/vk-renderer.cpp
+++ b/src/vk-renderer.cpp
@@ -359,12 +359,12 @@ void vkrenderer::compute(uint32_t width, uint32_t height) {
vkCmdPushConstants(cmd_buf, compute_pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, 8, (void*)&scene_buffer.device_address);
vkCmdPushConstants(cmd_buf, compute_pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 8, 8, (void*)&geometry_buffer.device_address);
vkCmdPushConstants(cmd_buf, compute_pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 16, 8, (void*)&bvh_buffer.device_address);
- api.run_compute_pipeline(cmd_buf, compute_pipeline, compute_shader_sets[virtual_frame_index], width / 8, height / 8, 1);
+ api.run_compute_pipeline(cmd_buf, compute_pipeline, compute_shader_sets[virtual_frame_index], (width / 8) + 1, (height / 8) + 1, 1);
api.image_barrier(cmd_buf, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_GENERAL, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 0, swapchain.images[swapchain_image_index]);
- api.run_compute_pipeline(cmd_buf, tonemapping_pipeline, tonemapping_shader_sets[virtual_frame_index], width / 8, height / 8, 1);
+ api.run_compute_pipeline(cmd_buf, tonemapping_pipeline, tonemapping_shader_sets[virtual_frame_index], (width / 8) + 1, (height / 8) + 1, 1);
}
void vkrenderer::finish_frame() {