diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-06-13 14:35:41 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-06-13 14:35:41 +0400 |
commit | 902014555a401f770ec17ffeb77e65dc8615c30c (patch) | |
tree | 4f14c362775071c066fb3e90a451d2cdf467d8bf /source/blender/compositor/operations/COM_ScaleOperation.cpp | |
parent | 6fa1af2a216cf4c4c944818bc0b9f68b4cc7ff6b (diff) |
always use bicubic sampler for the scale node with the new compositor since it worked like this in the old compositor.
this ignores the sampler passed and could be done in a nicer way so left this as an ifdef so it can be easily redone.
Diffstat (limited to 'source/blender/compositor/operations/COM_ScaleOperation.cpp')
-rw-r--r-- | source/blender/compositor/operations/COM_ScaleOperation.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_ScaleOperation.cpp b/source/blender/compositor/operations/COM_ScaleOperation.cpp index ef1199cfa32..341bcdd1b62 100644 --- a/source/blender/compositor/operations/COM_ScaleOperation.cpp +++ b/source/blender/compositor/operations/COM_ScaleOperation.cpp @@ -22,6 +22,10 @@ #include "COM_ScaleOperation.h" +#define USE_FORCE_BICUBIC +/* XXX - ignore input and use default from old compositor, + * could become an option like the transform node - campbell */ + ScaleOperation::ScaleOperation() : NodeOperation() { this->addInputSocket(COM_DT_COLOR); @@ -52,6 +56,10 @@ void ScaleOperation::deinitExecution() void ScaleOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +#ifdef USE_FORCE_BICUBIC + sampler = COM_PS_BICUBIC; +#endif + float scaleX[4]; float scaleY[4]; @@ -118,6 +126,10 @@ void ScaleAbsoluteOperation::deinitExecution() void ScaleAbsoluteOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +#ifdef USE_FORCE_BICUBIC + sampler = COM_PS_BICUBIC; +#endif + float scaleX[4]; float scaleY[4]; @@ -186,6 +198,10 @@ void ScaleFixedSizeOperation::deinitExecution() void ScaleFixedSizeOperation::executePixel(float *color, float x, float y, PixelSampler sampler, MemoryBuffer *inputBuffers[]) { +#ifdef USE_FORCE_BICUBIC + sampler = COM_PS_BICUBIC; +#endif + this->inputOperation->read(color, x * relX, y * relY, sampler, inputBuffers); } |