rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.21k stars 287 forks source link

Entity path (and others?) hashes somehow differ on native vs. web #6706

Open teh-cmc opened 2 months ago

teh-cmc commented 2 months ago

Which means that doing stuff like e.g. computing a fallback color based on entity path yields different colors on native vs. web which is weird.

#[inline]
pub fn auto_color_for_entity_path(
    entity_path: &re_entity_db::EntityPath,
) -> re_types::components::Color {
    auto_color_egui((entity_path.hash64() % std::u16::MAX as u64) as u16).into()
}

Native: image

Web: image

emilk commented 2 months ago

This is probably because we use ahash: https://github.com/tkaitchuck/aHash#goals-and-non-goals