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.
This commit is contained in:
Omar Emara
2022-11-09 10:35:41 +02:00
parent 3836b6ff8c
commit aba0d01b78

View File

@@ -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(