diff --git a/crates/build/re_types_builder/src/codegen/cpp/mod.rs b/crates/build/re_types_builder/src/codegen/cpp/mod.rs index 24f91b5d9bf5..79da26aba780 100644 --- a/crates/build/re_types_builder/src/codegen/cpp/mod.rs +++ b/crates/build/re_types_builder/src/codegen/cpp/mod.rs @@ -2182,7 +2182,7 @@ fn quote_archetype_field_type(hpp_includes: &mut Includes, obj_field: &ObjectFie quote! { Collection<#elem_type> } } // TODO(andreas): This should emit `MonoCollection` which will be a constrained version of `Collection`. - // (simply adapting `MonoCollection` breaks some existing code, so this not entirely trivial to do. + // (Simply adapting `MonoCollection` breaks some existing code, so this not entirely trivial to do. // Designing constraints for `MonoCollection` is harder still) Type::Object(fqname) => quote_fqname_as_type_path(hpp_includes, fqname), _ => panic!("Only vectors and objects are allowed in archetypes."), diff --git a/crates/viewer/re_renderer/shader/depth_cloud.wgsl b/crates/viewer/re_renderer/shader/depth_cloud.wgsl index b2784acc7bb4..6ec20abab2e2 100644 --- a/crates/viewer/re_renderer/shader/depth_cloud.wgsl +++ b/crates/viewer/re_renderer/shader/depth_cloud.wgsl @@ -202,11 +202,10 @@ fn fs_main_picking_layer(in: VertexOut) -> @location(0) vec4u { @fragment fn fs_main_outline_mask(in: VertexOut) -> @location(0) vec2u { - // Output is an integer target, can't use coverage therefore. - // But we still want to discard fragments where coverage is low. - // Since the outline extends a bit, a very low cut off tends to look better. + // Output is an integer target so we can't use coverage even though + // the target is anti-aliased. let coverage = sphere_quad_coverage(in.pos_in_world, in.point_radius, in.point_pos_in_world); - if coverage < 1.0 { + if coverage <= 0.5 { discard; } return depth_cloud_info.outline_mask_id; diff --git a/crates/viewer/re_renderer/shader/lines.wgsl b/crates/viewer/re_renderer/shader/lines.wgsl index 3f830e682d0d..9b0ff722fef1 100644 --- a/crates/viewer/re_renderer/shader/lines.wgsl +++ b/crates/viewer/re_renderer/shader/lines.wgsl @@ -370,10 +370,12 @@ fn fs_main_picking_layer(in: VertexOut) -> @location(0) vec4u { @fragment fn fs_main_outline_mask(in: VertexOut) -> @location(0) vec2u { // Output is an integer target, can't use coverage therefore. - // But we still want to discard fragments where coverage is low. - // Since the outline extends a bit, a very low cut off tends to look better. + // But we still want to discard fragments where coverage is too low, otherwise + // we'd not handle rounded corners etc. correctly. + // Note that `compute_coverage` may already give coverage values below 1.0 along the + // "main body of the line", not just the caps. var coverage = compute_coverage(in); - if coverage < 1.0 { + if coverage <= 0.0 { discard; } return batch.outline_mask_ids; diff --git a/crates/viewer/re_renderer/shader/point_cloud.wgsl b/crates/viewer/re_renderer/shader/point_cloud.wgsl index 1d9c441b6468..0cd1cf312e42 100644 --- a/crates/viewer/re_renderer/shader/point_cloud.wgsl +++ b/crates/viewer/re_renderer/shader/point_cloud.wgsl @@ -173,11 +173,10 @@ fn fs_main_picking_layer(in: VertexOut) -> @location(0) vec4u { @fragment fn fs_main_outline_mask(in: VertexOut) -> @location(0) vec2u { - // Output is an integer target, can't use coverage therefore. - // But we still want to discard fragments where coverage is low. - // Since the outline extends a bit, a very low cut off tends to look better. + // Output is an integer target so we can't use coverage even though + // the target is anti-aliased. let coverage = coverage(in.world_position, in.radius, in.point_center); - if coverage < 1.0 { + if coverage <= 0.5 { discard; } return batch.outline_mask;