diff options
author | Omar Emara <mail@OmarEmara.dev> | 2022-11-09 11:35:41 +0300 |
---|---|---|
committer | Omar Emara <mail@OmarEmara.dev> | 2022-11-09 11:35:41 +0300 |
commit | aba0d01b781addf712443c525f3343279b40e323 (patch) | |
tree | d8dc5e0f2945385b4c41659e6e3ed068d9ab5efd | |
parent | 3836b6ff8cba135d185e147dbffca7847870e6cd (diff) |
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.
-rw-r--r-- | source/blender/compositor/realtime_compositor/intern/realize_on_domain_operation.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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( |