diff options
author | Andreas Grois <andi@grois.info> | 2018-03-23 23:21:43 +0100 |
---|---|---|
committer | Andreas Grois <andi@grois.info> | 2018-03-23 23:21:43 +0100 |
commit | 53a8f22f9d46caf533edf5081477ab36c57c7c89 (patch) | |
tree | 4815482a1dfb1185b466ad67aaaea984e55e5372 /BuddhaTest/src/Helpers.cpp | |
parent | 183f60d1305e4de6729882f18311090b33d5374b (diff) |
Fix issues caused by symmetry usage (remove symmetry for now). Re-add once it's working...
Diffstat (limited to 'BuddhaTest/src/Helpers.cpp')
-rw-r--r-- | BuddhaTest/src/Helpers.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/BuddhaTest/src/Helpers.cpp b/BuddhaTest/src/Helpers.cpp index bd667fb..51c1056 100644 --- a/BuddhaTest/src/Helpers.cpp +++ b/BuddhaTest/src/Helpers.cpp @@ -181,12 +181,11 @@ namespace Helpers { maxValue = std::max(maxValue,data[i]); } - for(unsigned int row = 0; row < bufferHeight/2; ++row) + for(unsigned int row = 0; row < bufferHeight; ++row) { - unsigned int otherRow = bufferHeight - 1-row; for(unsigned int col=0;col < width*3; ++col) { - double c = 0.5*(data[col + row*width*3] + data[col + otherRow*width*3]); + double c = data[col + row*width*3]; if(fabs(gamma - 1.0) > 0.0001 || fabs(colorScale - 1.0) > 0.0001) { pngData[col + row*width*3] = static_cast<png_byte>(255.0 * pow(std::min(1.0,colorScale*c/static_cast<double>(maxValue)),gamma)); @@ -195,7 +194,6 @@ namespace Helpers { pngData[col + row*width*3] = (255*c + (maxValue/2))/maxValue; } - pngData[col+otherRow*width*3] = pngData[col + row*width*3]; } } |