From aba0d01b781addf712443c525f3343279b40e323 Mon Sep 17 00:00:00 2001 From: Omar Emara Date: Wed, 9 Nov 2022 10:35:41 +0200 Subject: 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. --- .../realtime_compositor/intern/realize_on_domain_operation.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/compositor/realtime_compositor') 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( -- cgit v1.2.3