Update formatting

This commit is contained in:
Georg Hagen
2024-12-31 11:06:40 +01:00
parent b13cdeb362
commit 8b7f536442

View File

@@ -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<int32_t>(depthQueryCoordinates.x * depthExtent.width);
x = std::min<int32_t>(depthExtent.width - SAMPLE_SIZE_WIDTH, std::max(0, x));
int32_t y = static_cast<int32_t>(depthQueryCoordinates.y * depthExtent.height);
y = std::min<int32_t>(depthExtent.height - SAMPLE_SIZE_HEIGHT, std::max(0, y));
return { x, y, 0 };
}