Page 1 of 1

HSV Adjust

PostPosted: Tue Aug 15, 2017 5:36 pm
by nodarb
The HSV Adjust top seems to be clamping pixels at 0-1 range even when set to 32bit float output.
HSV_Clamp.png (156.22 KiB) Viewed 1200 times

Is this the expected behavior or bug?

Re: HSV Adjust

PostPosted: Tue Aug 15, 2017 9:01 pm
by archo-p
I believe this is to be expected.

Since TOP data is usually RGB, in order to do HSV operations it has to be internally converted to HSV in the shader, operated on, then returned to RGB, so I imagine it clamps before converting since going from RGB to HSV inherently requires the RGB values to be within a set range to get meaningful HSV numbers.

Perhaps there is a way to maintain floating point precision by giving a maximum range for the RGB values that can inform a custom HSV conversion and set of operations before going back to RGB... not sure. But regardless, even sticking between 0-1 you still have more precision than 8 bit channels I think, so you could perhaps range before going into the HSV, than re-expand your range?