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:
authorManuel Castilla <manzanillawork@gmail.com>2021-08-20 14:56:26 +0300
committerManuel Castilla <manzanillawork@gmail.com>2021-08-20 16:03:17 +0300
commitf669932c93226c2bdbf45d6fb6827ff349643772 (patch)
tree350bb0c23bc95244d388b8f59f14449a8f2738dd /source/blender/compositor/operations
parent7e840321c75df3f47e0b1d1920a248889c481239 (diff)
Compositor: Fix plane distort operations incorrect areas of interest
The original implementation doesn't work for all cases.
Diffstat (limited to 'source/blender/compositor/operations')
-rw-r--r--source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc
index 91af4f0e5aa..a80cbbe942a 100644
--- a/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc
+++ b/source/blender/compositor/operations/COM_PlaneDistortCommonOperation.cc
@@ -195,6 +195,15 @@ void PlaneDistortWarpImageOperation::get_area_of_interest(const int input_idx,
return;
}
+ /* TODO: figure out the area needed for warping and EWA filtering. */
+ r_input_area.xmin = 0;
+ r_input_area.ymin = 0;
+ r_input_area.xmax = get_input_operation(0)->getWidth();
+ r_input_area.ymax = get_input_operation(0)->getHeight();
+
+/* Old implemention but resulting coordinates are way out of input operation bounds and in some
+ * cases the area result may incorrectly cause cropping. */
+#if 0
float min[2], max[2];
INIT_MINMAX2(min, max);
for (int sample = 0; sample < this->m_motion_blur_samples; sample++) {
@@ -219,6 +228,7 @@ void PlaneDistortWarpImageOperation::get_area_of_interest(const int input_idx,
r_input_area.ymin = min[1] - 1;
r_input_area.xmax = max[0] + 1;
r_input_area.ymax = max[1] + 1;
+#endif
}
/* ******** PlaneDistort Mask ******** */