Fixed logic error for iterating through the image data by region

Signed-off-by: Chris Galvan <chgalvan@amazon.com>
This commit is contained in:
Chris Galvan
2022-01-18 16:22:25 -06:00
parent 798f6ea5bb
commit 948d72e079
@@ -285,9 +285,9 @@ namespace AZ
auto width = imageDescriptor.m_size.m_width;
size_t outValuesIndex = 0;
for (uint32_t x = topLeft.first; x <= bottomRight.first; ++x)
for (uint32_t y = topLeft.second; y <= bottomRight.second; ++y)
{
for (uint32_t y = topLeft.second; y <= bottomRight.second; ++y)
for (uint32_t x = topLeft.first; x <= bottomRight.first; ++x)
{
size_t imageDataIndex = (y * width) + x;
@@ -311,9 +311,9 @@ namespace AZ
auto width = imageDescriptor.m_size.m_width;
size_t outValuesIndex = 0;
for (uint32_t x = topLeft.first; x <= bottomRight.first; ++x)
for (uint32_t y = topLeft.second; y <= bottomRight.second; ++y)
{
for (uint32_t y = topLeft.second; y <= bottomRight.second; ++y)
for (uint32_t x = topLeft.first; x <= bottomRight.first; ++x)
{
size_t imageDataIndex = (y * width) + x;
@@ -337,9 +337,9 @@ namespace AZ
auto width = imageDescriptor.m_size.m_width;
size_t outValuesIndex = 0;
for (uint32_t x = topLeft.first; x <= bottomRight.first; ++x)
for (uint32_t y = topLeft.second; y <= bottomRight.second; ++y)
{
for (uint32_t y = topLeft.second; y <= bottomRight.second; ++y)
for (uint32_t x = topLeft.first; x <= bottomRight.first; ++x)
{
size_t imageDataIndex = (y * width) + x;