Skip to content

Commit

Permalink
Fix hover/select highlights when picking single points in a scene wit…
Browse files Browse the repository at this point in the history
…h multiple point clouds (#1942)

Batch vertex offset for single highlights wasn't correctly computed. Different parts of the code made different assumptions what offsets referred to
  • Loading branch information
Wumpf authored Apr 20, 2023
1 parent ee9a947 commit f940fc4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/re_renderer/src/renderer/point_cloud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub struct PointCloudBatchInfo {

/// Defines an outline mask for an individual vertex ranges.
///
/// Vertex ranges are *not* relative within the current batch, but relates to the draw data vertex buffer.
/// Vertex ranges are relative within the current batch.
///
/// Having many of these individual outline masks can be slow as they require each their own uniform buffer & draw call.
/// This feature is meant for a limited number of "extra selections"
Expand Down Expand Up @@ -455,6 +455,8 @@ impl PointCloudDrawData {
));

for (range, _) in &batch_info.additional_outline_mask_ids_vertex_ranges {
let range = (range.start + start_point_for_next_batch)
..(range.end + start_point_for_next_batch);
batches_internal.push(point_renderer.create_point_cloud_batch(
ctx,
format!("{:?} strip-only {:?}", batch_info.label, range).into(),
Expand Down

0 comments on commit f940fc4

Please sign in to comment.