From aa2efbf9784732eed72e120998bae826d65a6d14 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 1 Dec 2025 07:57:09 +0000 Subject: [PATCH] Fix: Avoid rounding when rounding_px is too small Co-authored-by: richiemcilroy1 --- crates/rendering/src/shaders/composite-video-frame.wgsl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/rendering/src/shaders/composite-video-frame.wgsl b/crates/rendering/src/shaders/composite-video-frame.wgsl index 04c2206083..cfe36680d4 100644 --- a/crates/rendering/src/shaders/composite-video-frame.wgsl +++ b/crates/rendering/src/shaders/composite-video-frame.wgsl @@ -270,8 +270,10 @@ fn sample_texture(uv: vec2, crop_bounds_uv: vec4) -> vec4 { } fn apply_rounded_corners(current_color: vec4, target_uv: vec2) -> vec4 { - // Compute the signed distance to the rounded rect in pixel space so we can - // blend edges smoothly instead of hard-clipping them (which produced jaggies). + if uniforms.rounding_px < 0.5 { + return current_color; + } + let centered_uv = (target_uv - vec2(0.5)) * uniforms.target_size; let half_size = uniforms.target_size * 0.5; let distance = sdf_rounded_rect(centered_uv, half_size, uniforms.rounding_px, uniforms.rounding_type);