RobustToolbox icon indicating copy to clipboard operation
RobustToolbox copied to clipboard

Fixes luminance underflow in FromHCY

Open redmoogle opened this issue 1 year ago • 2 comments

image

image

was working on OD was confused by the blue gradient then realized that the blue value was negative and this fixes that

redmoogle avatar Aug 15 '24 01:08 redmoogle

What input values reproduce this behavior?

PJB3005 avatar Aug 21 '24 00:08 PJB3005

What input values reproduce this behavior?

Should be any value between pure red and pure green ( like the picture ablve)

redmoogle avatar Aug 21 '24 00:08 redmoogle

After a bunch of digging I've come to the conclusion the "HCY" color space is ill-defined and mathematically incorrect, so I'd rather just remove it from RT entirely. I'll close this PR and commit a deprecation for them.

For OpenDream's use case, I recommend you implement your own copy of the functions instead. For what it's worth, it seems like this fix isn't correct, and instead there's some scaling factor missing. Check this I guess: https://chilliant.blogspot.com/2012/08/rgbhcy-in-hlsl.html

PJB3005 avatar Mar 24 '25 03:03 PJB3005