diff --git a/openVulkanoCpp/Vulkan/DepthBufferQuery.cpp b/openVulkanoCpp/Vulkan/DepthBufferQuery.cpp index 3b2b376..fd1a48f 100644 --- a/openVulkanoCpp/Vulkan/DepthBufferQuery.cpp +++ b/openVulkanoCpp/Vulkan/DepthBufferQuery.cpp @@ -70,12 +70,9 @@ namespace OpenVulkano::Vulkan vk::Offset3D DepthBufferQuery::GetCopyOffset() const { vk::Extent3D depthExtent = renderer.GetContext().swapChain.GetCurrentDepthBuffer().extent; - int32_t x = static_cast(depthQueryCoordinates.x * depthExtent.width); x = std::min(depthExtent.width - SAMPLE_SIZE_WIDTH, std::max(0, x)); - int32_t y = static_cast(depthQueryCoordinates.y * depthExtent.height); - y = std::min(depthExtent.height - SAMPLE_SIZE_HEIGHT, std::max(0, y)); return { x, y, 0 }; }