o3de / o3de

Open 3D Engine (O3DE) is an Apache 2.0-licensed multi-platform 3D engine that enables developers and content creators to build AAA games, cinema-quality 3D worlds, and high-fidelity simulations without any fees or commercial obligations.
https://o3de.org
Other
7.83k stars 2.21k forks source link

[Light component]The maximum value filled in the box for (R/G/B,L(HSL),V(HSV)) should be the same as the slider on color selector #4209

Open instoneks2018 opened 3 years ago

instoneks2018 commented 3 years ago

Describe the bug

 item   hardMaximum(in the number field)   softMaximum(on the slider bar)
 R/G/B   3178                                   255
 L(HSL)  1250                                   100
 V(HSV)  1250                                   100

The hardMaximum value in the number box for (R/G/B,L(HSL),V(HSV)) is not equal to the softMaximum value on the slider bar(Of course, maybe different value Ranges and 3178/1250 have other intentions, please let me know).

To Reproduce Steps to reproduce the behavior:

1.Open Editor. 2.Create a new Entity. 3.Add Light Component. 4.Switch to the Select Color. 5.Click the RGB/HSL/HSV options respectively. 6.Enter a large value in the number field.

Expected behavior The value in the number field should not be greater than the maximum value on the slider bar

Screenshots

Desktop/Device (please complete the following information):

Additional context

hardMaximum not equal to softMaximum, code Implementation as follows:

https://github.com/o3de/o3de/blob/c28bc7c6d8c7316f9c7053423d40a7b8ebd0c696/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorComponentSliders.cpp#L66-L71

 RGB:3187 changed to 255, is it right?

https://github.com/o3de/o3de/blob/c28bc7c6d8c7316f9c7053423d40a7b8ebd0c696/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorComponentSliders.cpp#L446-L452

 L(HSL):1250 changed to 100, is it right?

https://github.com/o3de/o3de/blob/c28bc7c6d8c7316f9c7053423d40a7b8ebd0c696/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorComponentSliders.cpp#L186-L187

  V(HSV):1250 changed to 100, is it right?

https://github.com/o3de/o3de/blob/c28bc7c6d8c7316f9c7053423d40a7b8ebd0c696/Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/ColorComponentSliders.cpp#L320-L321

monroegm commented 2 years ago

Sending over to SIG-Graphics-Aduio who would know more about these specific ranges and how they are intended to work

invertednormal commented 2 years ago

@cgalvan I think this is more your wheelhouse Chris.