Skip to content
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

Merged
merged 6 commits into from
Sep 21, 2023

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Sep 19, 2023

What

image

Checklist

@Wumpf Wumpf added 🪳 bug Something isn't working enhancement New feature or request 📺 re_viewer affects re_viewer itself labels Sep 19, 2023
@teh-cmc
Copy link
Member

teh-cmc commented Sep 20, 2023

(Speaking as a color n00b) shouldn't we fix the gamma here? That grayscale isn't much of a scale 😬
image

Wumpf added a commit that referenced this pull request Sep 21, 2023
### 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/)
@Wumpf Wumpf requested a review from emilk September 21, 2023 11:11
@@ -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();
Copy link
Member Author

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!

Copy link
Member

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, nice one!

@emilk emilk merged commit 4a62dd5 into main Sep 21, 2023
@emilk emilk deleted the andreas/fix-colormap-preview branch September 21, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪳 bug Something isn't working enhancement New feature or request 📺 re_viewer affects re_viewer itself
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Colormap selection preview is sometimes bugged, sometimes not there at all
3 participants