Adsk Contrib - Add built-in displays that mirror rather than clamp negative values#2183
Merged
doug-walker merged 3 commits intoSep 12, 2025
Conversation
Signed-off-by: Doug Walker <doug.walker@autodesk.com>
remia
approved these changes
Sep 2, 2025
Collaborator
remia
left a comment
There was a problem hiding this comment.
It seems that some update to Gihub runners or ASWF docker image broke our CI but otherwise looks good.
cozdas
reviewed
Sep 12, 2025
| { 1.0e-6f, | ||
| { 0.5f, 0.4f, 0.3f }, { 0.933793573229f, 0.564092030327f, 0.550040502218f } } }, | ||
| { 0.5f, 0.4f, 0.3f, -0.05f, 0.05f, 1.25f }, | ||
| { 0.933793573229f, 0.564092030327f, 0.550040502218f, -11.142147651136028f, 0.477958897494f, 1.124971166876f } } }, |
Collaborator
There was a problem hiding this comment.
Probably ~-11 corresponding to -0.05 is an expected outcome but since it's an outlier, I wanted to mention. Ignore this comment if that's expected.
Collaborator
Author
There was a problem hiding this comment.
It is expected. The unmirrored sRGB transfer function is just linearly extrapolating the linear segment, which has a high slope.
The conversion of XYZ [-.05, .05, 1.25] to RGB is [-0.86218110634 , 0.194204378648, 1.308234040874], and then the -0.86 is multiplied by the slope of the linear segment, which is 12.92.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Per discussion in the TSC, this PR adds built-in transforms that may be used to create display color spaces. The names of the new built-ins are the names of the clamping versions with " - MIRROR NEGS" appended. The following are the new built-in transform names:
"DISPLAY - CIE-XYZ-D65_to_REC.1886-REC.709 - MIRROR NEGS",
"DISPLAY - CIE-XYZ-D65_to_REC.1886-REC.2020 - MIRROR NEGS",
"DISPLAY - CIE-XYZ-D65_to_G2.2-REC.709 - MIRROR NEGS",
"DISPLAY - CIE-XYZ-D65_to_sRGB - MIRROR NEGS",
"DISPLAY - CIE-XYZ-D65_to_G2.6-P3-D65 - MIRROR NEGS"
Additional unit tests were added to validate the clamping and mirroring behavior.
Note that the DisplayP3, HLG, and PQ built-ins are already mirroring, so no changes were needed there. A few of the other built-ins I did not add a mirrored version for since they are not used in our built-in configs.