Skip to content

Commit f940fc4

Browse files
authored
Fix hover/select highlights when picking single points in a scene with 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
1 parent ee9a947 commit f940fc4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/re_renderer/src/renderer/point_cloud.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ pub struct PointCloudBatchInfo {
130130

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

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

0 commit comments

Comments
 (0)