Skip to content

Commit

Permalink
[tests] Add required audio stream snapshot tests (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
wkozyra95 committed Nov 12, 2024
1 parent a4186fe commit faf0365
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ fn fs_main(input: VertexOutput) -> @location(0) vec4<f32> {
rotation_degrees
);

let blur_alpha = smoothstep(0.0, blur_radius, edge_distance) * mask_alpha;
let blur_alpha = smoothstep(-blur_radius / 2.0, blur_radius / 2.0, edge_distance) * mask_alpha;

return vec4<f32>(color.rgb, color.a * blur_alpha);
}
Expand Down
13 changes: 6 additions & 7 deletions compositor_render/src/transformations/layout/flatten.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,16 +346,15 @@ impl NestedLayout {
/// calculate RenderLayout for one of self box shadows
fn box_shadow_layout(&self, box_shadow: &BoxShadow, parent_masks: &[Mask]) -> RenderLayout {
RenderLayout {
top: self.top + box_shadow.offset_y - 0.5 * box_shadow.blur_radius,
left: self.left + box_shadow.offset_x - 0.5 * box_shadow.blur_radius,
width: self.width + box_shadow.blur_radius,
height: self.height + box_shadow.blur_radius,
top: self.top + box_shadow.offset_y,
left: self.left + box_shadow.offset_x,
width: self.width,
height: self.height,
rotation_degrees: self.rotation_degrees, // TODO: this is incorrect
border_radius: self.border_radius + box_shadow.blur_radius,
border_radius: self.border_radius + (box_shadow.blur_radius / 2.0),
content: RenderLayoutContent::BoxShadow {
color: box_shadow.color,
blur_radius: box_shadow.blur_radius * 2.0, // TODO: 2.0 is empirically selected
// value
blur_radius: box_shadow.blur_radius,
},
masks: parent_masks.to_vec(),
}
Expand Down

0 comments on commit faf0365

Please sign in to comment.