-
Notifications
You must be signed in to change notification settings - Fork 373
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 colormap picker preview & show it for depth point clouds as well #3373
Conversation
### What Pointed out in #3373 that our grey colormap looked broken in the preview. When diving into it I got at first a scare about our color space pipeline being broken, but eventually I concluded that it was only the gray colormap which was broken. Grey before/after with reference gradient from gimp: ![fix](https://github.com/rerun-io/rerun/assets/1220815/d293d4a1-7aa4-4307-b66e-f0b6ad6ec7de) It's not perfectly equal to the reference, but then again the test wasn't executed with maximum vigor either. Some slight differences are to be expected due to the amount of conversions we need to go through to arrive at the final image. (unchanged) turbo colormap gradient compared with the render from Matplot webpage (a bit sloppy but shows that we're definitely not some wild gamma converstion away from it!): <img width="1248" alt="image" src="https://github.com/rerun-io/rerun/assets/1220815/1440e775-7b7c-4327-a6b0-dadbf8e78a6f"> This affects all usages of the greyscale colormap. ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested [demo.rerun.io](https://demo.rerun.io/pr/3391) (if applicable) - [PR Build Summary](https://build.rerun.io/pr/3391) - [Docs preview](https://rerun.io/preview/3eee011742a208f6f3d07353c67fb0f3059c6851/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/3eee011742a208f6f3d07353c67fb0f3059c6851/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://ref.rerun.io/dev/bench/) - [Wasm size tracking](https://ref.rerun.io/dev/sizes/)
@@ -116,7 +116,7 @@ impl egui_wgpu::CallbackTrait for ReRendererCallback { | |||
return; | |||
}; | |||
|
|||
let screen_position = (info.clip_rect.min.to_vec2() * info.pixels_per_point).round(); | |||
let screen_position = (info.viewport.min.to_vec2() * info.pixels_per_point).round(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the actual bugfix!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, nice one!
@@ -116,7 +116,7 @@ impl egui_wgpu::CallbackTrait for ReRendererCallback { | |||
return; | |||
}; | |||
|
|||
let screen_position = (info.clip_rect.min.to_vec2() * info.pixels_per_point).round(); | |||
let screen_position = (info.viewport.min.to_vec2() * info.pixels_per_point).round(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, nice one!
What
Checklist