From 8d2e79aaab565044f86c9fd1a2d47a565f2bcb62 Mon Sep 17 00:00:00 2001 From: Lukas Toenne Date: Thu, 5 Sep 2013 10:45:21 +0000 Subject: Fix #36113, Translate's wrapping has 1 pixel gap in X and Y after scale node. The issue with wrapping is that it requires correct interpolation of the border pixels. Since interpolation is done at the far left end of the node tree in buffer/image/etc read operations, the wrapping setting can not be used directly in those operations (otherwise in-line translate operations would cause conflicts). To make wrapping work correctly we need to add a buffer in front of the translate operation, which can then be interpolated correctly based on wrapping. The WrapOperation becomes a variant of ReadBufferOperation, which uses its wrapping setting to determine the correct "extend" mode for interpolation of the buffer. --- source/blender/compositor/operations/COM_WrapOperation.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'source/blender/compositor/operations/COM_WrapOperation.h') diff --git a/source/blender/compositor/operations/COM_WrapOperation.h b/source/blender/compositor/operations/COM_WrapOperation.h index b84d85e7b5d..ddd5fa8032d 100644 --- a/source/blender/compositor/operations/COM_WrapOperation.h +++ b/source/blender/compositor/operations/COM_WrapOperation.h @@ -23,20 +23,16 @@ #ifndef _COM_WrapOperation_h_ #define _COM_WrapOperation_h_ -#include "COM_NodeOperation.h" +#include "COM_ReadBufferOperation.h" -class WrapOperation : public NodeOperation { +class WrapOperation : public ReadBufferOperation { private: - SocketReader *m_inputOperation; int m_wrappingType; public: WrapOperation(); bool determineDependingAreaOfInterest(rcti *input, ReadBufferOperation *readOperation, rcti *output); void executePixel(float output[4], float x, float y, PixelSampler sampler); - void initExecution(); - void deinitExecution(); - void setWrapping(int wrapping_type); float getWrappedOriginalXPos(float x); float getWrappedOriginalYPos(float y); -- cgit v1.2.3