Effects: Turbulent Displace displaces the whole layer, not one quadrant (#227)
Edge pinning (Turbulent Displace's default Pin All, Wave Warp's Pinning, Bulge's Pin All Edges) holds the layer bounds still: a comp-sized rectangle for shape and text layers. That rectangle started at the layer's origin, but a shape layer's content surrounds its origin (anchor 0,0), so everything left of or above the origin counted as outside the layer and was pinned: only the bottom-right quadrant of a centred shape moved. The renderer now passes the bounds' top-left in layer coordinates (EffectEnv::bounds_origin): (-w/2, -h/2) for layers without a source rectangle, (0, 0) otherwise. util::pin_rect places the bounds there and the three effects use it on the CPU and the GPU. Effect point parameters keep their current layer coordinates. Test: edge_pinning_displaces_all_of_a_centred_shape_layer, edge_pinning_on_a_shape_layer (GPU vs CPU). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
172b7cfcc0
commit
754e80bdf9
@@ -253,6 +253,8 @@ pub(crate) fn chain_key(chain: &[FxStep], buf: &Buf, levels: Option<f32>) -> u12
|
||||
k.debug(&e.working_space);
|
||||
k.u64(e.working_linear as u64);
|
||||
k.debug(&e.shutter);
|
||||
k.f64(e.bounds_origin[0]);
|
||||
k.f64(e.bounds_origin[1]);
|
||||
}
|
||||
k.finish()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user