Skip to content

shaders/colorspace: don't linearize/delinearize XYZ in decode/encode color

Due to API desing pl_shader_{encode,decode}_color doesn't have full information about colorspace needed to correctly linearize the signal.

Notably the luminance is missing, which causes it to use default SDR black point, which is not correct if user set target to different black/white point. libplacebo expects linear signal to be raised above display black level.

This also follows better how it should work. While it requires linearization as precondition, it can be done before calling encode/decode.

Merge request reports

Loading