-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
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
Tone-map HDR colours for ColorButton #1674
base: master
Are you sure you want to change the base?
Conversation
When an HDR editing mode is being used and the colour value is high, the swatch colour appears white. Implement simple tonemapping to bring the colours back into a usable range.
Thank you Thomas, will look into this. I was wondering if we should aim to use a gradient (with the tone mapped color on the edge and white around the center) to signify this. Did you get into other issues with using unbounded color values? Also linking to old notes in the color picker thread: |
Hi Omar, Having some sort of 'HDR' signifier could be useful, but I'd worry that you'd make it more difficult to read the actual colour; for example, with a gradient to white it could desaturate the original colour. It might be useful to allow the user to input both an input value and the tone-mapped representation of that value for display; that way people can input HDR values and have a preview of how they'll be tone-mapped in their use case. And yes, there are other issues with unbounded colour values which the ideas in the other thread would help with. The main problem is we generally select a colour by choosing a hue/saturation and then dragging the value up, but if we want to change the hue/saturation again later we can't - I think that's the RGB-HSV round-trip issue. By the way, thank you in general for ImGui - it's a great tool! |
With HDR displays becoming more common, ideally we could display the actual color somehow. I think the 2nd suggestion is a better intermediate solution though (passing two colors instead of one). |
I too think we should pass two colors. This means that the user can choose which tone mapper to use. |
One minor issue is that the functions flow is generally Not a big issue. Or we could provide an I was going to say, the tricky part is to have to introduce new function signature - but since the ColorEdit, ColorPicker functions take It won't be super easy to use for quick inline call but not a problem for data-driven property serializer. |
Alternatively, if you wanted maximum flexibility, you could have the callback be passed in to a Manually passing a mapped value doesn't work well for the colour picker, since there you'd ideally want to display a range of tone-mapped values rather than just the currently selected colour. |
0c1e5bd
to
bb6a60b
Compare
8b83e0a
to
d735066
Compare
b3b85d8
to
0755767
Compare
c817acb
to
8d39063
Compare
When an HDR editing mode is being used and the colour value is high, the swatch colour appears white. Implement simple tonemapping (just
component / (1 + component)
) to bring the colours back into a usable range.