fixing camera FOV issue

This commit is contained in:
2025-05-03 00:32:58 +02:00
parent 6fd558039d
commit af6ca30d64
9 changed files with 18 additions and 11 deletions

View File

@@ -80,6 +80,8 @@ namespace Scop
default: break;
}
kvfTransitionImageLayout(RenderCore::Get().GetDevice(), m_image, kvf_type, cmd, m_format, m_layout, new_layout, is_single_time_cmd_buffer);
if(is_single_time_cmd_buffer)
kvfDestroyCommandBuffer(RenderCore::Get().GetDevice(), cmd);
m_layout = new_layout;
}
@@ -94,8 +96,8 @@ namespace Scop
if(m_type == ImageType::Color || m_type == ImageType::Cube)
{
VkImageLayout old_layout = m_layout;
TransitionLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, cmd);
subresource_range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
TransitionLayout(VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, cmd);
VkClearColorValue clear_color = VkClearColorValue({ { color.x, color.y, color.z, color.w } });
RenderCore::Get().vkCmdClearColorImage(cmd, m_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &subresource_range);
TransitionLayout(old_layout, cmd);
@@ -126,6 +128,7 @@ namespace Scop
void Image::Destroy() noexcept
{
RenderCore::Get().WaitDeviceIdle();
DestroySampler();
DestroyImageView();