Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2014-06-30 16:03:59 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2014-06-30 16:04:26 +0400
commitca8d8f5e5271f894f7e5319eabe3f84602dbe011 (patch)
treefc85b2d4bd1ec6c80fd59d246fcd7ec353df6a8f /source/blender/compositor
parenta71a8be5cf0bd472a5629bf174e4043013a4f32b (diff)
Fix for subpixel sampling was broken for render layers node
Diffstat (limited to 'source/blender/compositor')
-rw-r--r--source/blender/compositor/operations/COM_RenderLayersProg.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/source/blender/compositor/operations/COM_RenderLayersProg.cpp b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
index af0d1b0b4f4..7141dd7bf72 100644
--- a/source/blender/compositor/operations/COM_RenderLayersProg.cpp
+++ b/source/blender/compositor/operations/COM_RenderLayersProg.cpp
@@ -142,16 +142,13 @@ void RenderLayersBaseProg::executePixelSampled(float output[4], float x, float y
int ix = x - dx;
int iy = y - dy;
-#else
- int ix = x;
- int iy = y;
#endif
if (this->m_inputBuffer == NULL) {
zero_v4(output);
}
else {
- doInterpolation(output, ix, iy, sampler);
+ doInterpolation(output, x, y, sampler);
}
}
@@ -204,22 +201,13 @@ RenderLayersAlphaProg::RenderLayersAlphaProg() : RenderLayersBaseProg(SCE_PASS_C
void RenderLayersAlphaProg::executePixelSampled(float output[4], float x, float y, PixelSampler sampler)
{
- int ix = x;
- int iy = y;
float *inputBuffer = this->getInputBuffer();
- if (inputBuffer == NULL || ix < 0 || iy < 0 || ix >= (int)this->getWidth() || iy >= (int)this->getHeight() ) {
- output[0] = 0.0f;
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
+ if (inputBuffer == NULL) {
+ zero_v4(output);
}
else {
- unsigned int offset = (iy * this->getWidth() + ix) * 4;
- output[0] = inputBuffer[offset + 3];
- output[1] = 0.0f;
- output[2] = 0.0f;
- output[3] = 0.0f;
+ doInterpolation(output, x, y, sampler);
}
}