From d0388f1f207ab723d3431b0e56cba5642af4c870 Mon Sep 17 00:00:00 2001 From: Jake Turner Date: Tue, 15 Aug 2023 10:54:36 +0100 Subject: [PATCH] Fix bug in y-flipping code in ResamplePixels() Closes #3025 In GL captures causes the generated thumbnail image to be incorrect for the middle two rows of the image. --- renderdoc/core/core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/core/core.cpp b/renderdoc/core/core.cpp index 5919f0179..d47c7b866 100644 --- a/renderdoc/core/core.cpp +++ b/renderdoc/core/core.cpp @@ -1320,7 +1320,7 @@ void RenderDoc::ResamplePixels(const FramePixels &in, RDCThumb &out) if(!in.is_y_flipped) { - for(uint16_t y = 0; y <= out.height / 2; y++) + for(uint16_t y = 0; y < out.height / 2; y++) { uint16_t flipY = (out.height - 1 - y); for(uint16_t x = 0; x < out.width; x++)