fix for compositor regression where blur note offset the image one pixel to the top right.
This commit is contained in:
@@ -123,7 +123,7 @@ void GaussianAlphaXBlurOperation::executePixel(float output[4], int x, int y, vo
|
||||
float value_max = finv_test(buffer[(x * 4) + (y * 4 * bufferwidth)], do_invert); /* init with the current color to avoid unneeded lookups */
|
||||
float distfacinv_max = 1.0f; /* 0 to 1 */
|
||||
|
||||
for (int nx = minx; nx < maxx; nx += step) {
|
||||
for (int nx = minx; nx <= maxx; nx += step) {
|
||||
const int index = (nx - x) + this->m_rad;
|
||||
float value = finv_test(buffer[bufferindex], do_invert);
|
||||
float multiplier;
|
||||
|
@@ -121,7 +121,7 @@ void GaussianAlphaYBlurOperation::executePixel(float output[4], int x, int y, vo
|
||||
float value_max = finv_test(buffer[(x * 4) + (y * 4 * bufferwidth)], do_invert); /* init with the current color to avoid unneeded lookups */
|
||||
float distfacinv_max = 1.0f; /* 0 to 1 */
|
||||
|
||||
for (int ny = miny; ny < maxy; ny += step) {
|
||||
for (int ny = miny; ny <= maxy; ny += step) {
|
||||
int bufferindex = ((minx - bufferstartx) * 4) + ((ny - bufferstarty) * 4 * bufferwidth);
|
||||
|
||||
const int index = (ny - y) + this->m_rad;
|
||||
|
@@ -96,7 +96,7 @@ void GaussianXBlurOperation::executePixel(float output[4], int x, int y, void *d
|
||||
int step = getStep();
|
||||
int offsetadd = getOffsetAdd();
|
||||
int bufferindex = ((minx - bufferstartx) * 4) + ((miny - bufferstarty) * 4 * bufferwidth);
|
||||
for (int nx = minx, index = (minx - x) + this->m_rad; nx < maxx; nx += step, index += step) {
|
||||
for (int nx = minx, index = (minx - x) + this->m_rad; nx <= maxx; nx += step, index += step) {
|
||||
const float multiplier = this->m_gausstab[index];
|
||||
madd_v4_v4fl(color_accum, &buffer[bufferindex], multiplier);
|
||||
multiplier_accum += multiplier;
|
||||
|
@@ -96,7 +96,7 @@ void GaussianYBlurOperation::executePixel(float output[4], int x, int y, void *d
|
||||
int index;
|
||||
int step = getStep();
|
||||
const int bufferIndexx = ((minx - bufferstartx) * 4);
|
||||
for (int ny = miny; ny < maxy; ny += step) {
|
||||
for (int ny = miny; ny <= maxy; ny += step) {
|
||||
index = (ny - y) + this->m_rad;
|
||||
int bufferindex = bufferIndexx + ((ny - bufferstarty) * 4 * bufferwidth);
|
||||
const float multiplier = this->m_gausstab[index];
|
||||
|
Reference in New Issue
Block a user