Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix outlines for lines having more preceived aliasing since 0.20 #8317

Merged
merged 4 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/build/re_types_builder/src/codegen/cpp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load bearing rust change so I get web builder ci triggered

// 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."),
Expand Down
8 changes: 5 additions & 3 deletions crates/viewer/re_renderer/shader/lines.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Wumpf marked this conversation as resolved.
Show resolved Hide resolved
discard;
}
return batch.outline_mask_ids;
Expand Down
Loading