Skip to content

Commit

Permalink
Fix incorrectly transposed matrix for displayp3 colorspaces (#1960)
Browse files Browse the repository at this point in the history
When originally authored the matrix was authored transposed. Further internal testing revealed this to manifest as an undesired shift towards red.
  • Loading branch information
ld-kerley committed Aug 7, 2024
1 parent cfa6f7b commit a20bef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libraries/cmlib/cmlib_ng.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,8 @@

<nodegraph name="NG_srgb_displayp3_to_lin_rec709_color3" nodedef="ND_srgb_displayp3_to_lin_rec709_color3">
<constant name="mat" type="matrix33">
<input name="value" type="matrix33" value="1.22493029, -0.22492968, 0.00000006, -0.04205868, 1.04205894, -0.00000001, -0.01964128, -0.07864794, 1.09828925" />
<input name="value" type="matrix33"
value="1.22493029, -0.04205868, -0.01964128, -0.22492968, 1.04205894, -0.07864794, 0.00000006,-0.00000001, 1.09828925"/>
</constant>
<!-- Use srgb_texture_to_lin_rec709 to convert from sRGB to Lin before passing to the mat conversion -->
<srgb_texture_to_lin_rec709 name="srgb_transform" type="color3">
Expand Down Expand Up @@ -354,7 +355,8 @@

<nodegraph name="NG_lin_displayp3_to_lin_rec709_color3" nodedef="ND_lin_displayp3_to_lin_rec709_color3">
<constant name="mat" type="matrix33">
<input name="value" type="matrix33" value="1.22493029, -0.22492968, 0.00000006, -0.04205868, 1.04205894, -0.00000001, -0.01964128, -0.07864794, 1.09828925" />
<input name="value" type="matrix33"
value="1.22493029, -0.04205868, -0.01964128, -0.22492968, 1.04205894, -0.07864794, 0.00000006,-0.00000001, 1.09828925"/>
</constant>
<convert name="asVec" type="vector3">
<input name="in" type="color3" interfacename="in" />
Expand Down

0 comments on commit a20bef0

Please sign in to comment.