Skip to content

Commit

Permalink
tweak how outlines deal with coverage mask on lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Wumpf committed Mar 10, 2023
1 parent 12854b6 commit 9955c28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/re_renderer/shader/lines.wgsl
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,9 @@ fn fs_main(in: VertexOut) -> @location(0) Vec4 {
fn fs_main_outline_mask(in: VertexOut) -> @location(0) UVec2 {
// 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.
var coverage = compute_coverage(in);
if coverage < 0.5 {
if coverage < 1.0 {
discard;
}
return batch.outline_mask;
Expand Down

0 comments on commit 9955c28

Please sign in to comment.