core: Only scale filters with stage view matrix

This commit is contained in:
Nathan Adams 2023-07-09 15:23:07 +02:00
parent 1aa2ac28c2
commit f150a32d86
4 changed files with 5 additions and 3 deletions

View File

@ -738,9 +738,11 @@ pub fn render_base<'gc>(this: DisplayObject<'gc>, context: &mut RenderContext<'_
y_min: 0,
y_max: height as i32,
};
let stage_matrix = context.stage.view_matrix();
for filter in &mut filters {
// Scaling is done by *stage view matrix* only, nothing in-between
filter.scale(stage_matrix.a, stage_matrix.d);
filter_rect = context.renderer.calculate_dest_rect(filter, filter_rect);
filter.scale(base_transform.matrix.a, base_transform.matrix.d);
}
let draw_offset = Point::new(filter_rect.x_min, filter_rect.y_min);
if cache.is_dirty(&base_transform.matrix, width, height) {

View File

@ -1,7 +1,7 @@
num_frames = 1
[image_comparison]
tolerance = 2
tolerance = 8
[player_options]
with_renderer = { sample_count = 1 }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 174 KiB

View File

@ -1,7 +1,7 @@
num_frames = 1
[image_comparison]
tolerance = 2
tolerance = 3
[player_options]
with_renderer = { optional = false, sample_count = 1 }