[Bf-blender-cvs] [aba0d01b781] master: Fix T102278: Compositor transforms apply locally

Omar Emara noreply at git.blender.org
Wed Nov 9 09:36:16 CET 2022


Commit: aba0d01b781addf712443c525f3343279b40e323
Author: Omar Emara
Date:   Wed Nov 9 10:35:41 2022 +0200
Branches: master
https://developer.blender.org/rBaba0d01b781addf712443c525f3343279b40e323

Fix T102278: Compositor transforms apply locally

When using two transformed compositor results, the transformation of one
of them is apparently in the local space of the other, while it should
be applied in the global space instead.

In order to realize a compositor result on a certain operation domain,
the domain of the result is projected on the operation domain and later
realized. This is done by multiplying by the inverse of the operation
domain. However, the order of multiplication was inverted, so the
transformation was applied in the local space of the operation domain.

This patch fixes that by inverting the order of multiplication in domain
realization.

===================================================================

M	source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc

===================================================================

diff --git a/source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc b/source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc
index 817293c0fa6..e5c448d0e33 100644
--- a/source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc
+++ b/source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc
@@ -38,8 +38,8 @@ void RealizeOnDomainOperation::execute()
   GPU_shader_bind(shader);
 
   /* Transform the input space into the domain space. */
-  const float3x3 local_transformation = input.domain().transformation *
-                                        domain_.transformation.inverted();
+  const float3x3 local_transformation = domain_.transformation.inverted() *
+                                        input.domain().transformation;
 
   /* Set the origin of the transformation to be the center of the domain. */
   const float3x3 transformation = float3x3::from_origin_transformation(



More information about the Bf-blender-cvs mailing list