microsoft/Win2D

Discussion of perceptual rendering intent and HDR-capable color spaces

benstevens48 opened this issue · 0 comments

I just wanted to post a few comments on perceptual rendering intent and HDR-capable color spaces somewhere where the DirectX team might see it.

In my opinion, the scRGB profile used by Direct2D makes a mess of the perceptual rendering intent. Unfortunately, the DtoB0 tag which specifies the perceptual intent, is identical to the relative colorimetric intent. This creates issues when combining with a classic (TRC and matrix-based) non-HDR profile. When mapping with the perceptual intent using classic profiles, (0,0,0) is mapped to the perceptual colour gamut black point (non-zero), so the transform is basically relative colorimetric with black point compensation, where the output black point is the perceptual gamut black point. This needs to be undone by the reverse transform, otherwise black will be mapped to something lighter than black. So this is what happens if you combine scRGB (or other built-in HDR profiles) with a standard color profile, with one exception. Direct2D seems to have an exception for sRGB to/from scRGB using the perceptual intent, which behaves the same as the relative colorimetric intent (sRGB ICC profiles are recognised if they use the sRGB value in the model field). So this fixes the problem for sRGB but not for anything else such as Adobe RGB, which just adds to the confusion.

In my opinion, profiles like scRGB should use a perceptual intent that is compatible with that of class profiles. Indeed, since it is just a black point compensation on top of relative colorimetric, it is easy to create a DtoB0 tag that does this and avoids clipping.