-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
ColorPicker: Add an intensity slider in raw mode for HDR #103583
base: master
Are you sure you want to change the base?
Conversation
From looking at this, it appears that the intensity slider is the exposure stops (log2/pow2). So an intensity of 0 is +0 stops, which uses the RGB values as-is. If my understanding is correct, I think this is a little confusing to users who are not familiar with stops. Even though I'm used to working in stops, I was still a bit confused and assumed the intensity slider was simply a multiplier on the RGB values -- This meant that I expected an intensity of 1.0 to result in no modification of the RGB values. (But this is not the case because this is actually +1 stops, not a 1.0 intensity multiplier). I think having the |
6be098d
to
4d01943
Compare
pow 2 is better than multiplier as it's easier to control the appearence of glow. Unity's intensity slider also uses pow 2. If we want to allow negative intensity, more works need to be done. |
My apologies, I did not mean to suggest it should be a multiplier. The functionality should definitely be in stops, as implemented in the PR. I only brought up intensity multiplier because the current GUI of this PR makes me think this is how it behaves (even though it doesn't behave that way). |
I don't think this is strictly needed, but allowing negative stops is very much a standard convention for this sort of a slider, as shown in the Photoshop example I posted. |
4d01943
to
b56102d
Compare
Added support for negative intensity. |
#102240 adds |
I was also thinking about whether having the slider max at +6.0 or +4.0. I believe +6.0 is nice because it results in 0.0 being placed in the center of the GUI, which gives a pleasant appearance that reinforces that a value of 0.0 is "neutral" (as in, makes no difference to the colour value). But I agree that in practice, the user shouldn't need to go higher than +4.0... |
This looks great to me, thank you! Is it possible to use the prifix property on the spinbox to add a |
b56102d
to
c515505
Compare
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.
My review of the code was not very thorough, but the user experience of this PR looks great to me, now that the intensity slider extends to negative stops and the +
/-
signs are shown on the intensity value.
Thanks!
When color is overbright, automatically switch the hex text to script text. Meanwhile, add the "script" icon to theme to ensure the icon is also visible at runtime.
c515505
to
c7ba215
Compare
Close #99366
This PR adopts a relatively simple approach, without storing extra intensity field in Color class.
Adds an intensity slider and limit the max value of RGB to 1 in ColorPicker raw mode. Intensity is inferred from raw RGB and may change after switch color mode. The final color is calculated as
color * pow(2, intensity)
.Also keep the hex LineEdit always visiable and switch it to code if RGB exceeds the valid range.
Edit:

This depends on #102240 to allow greater values.