-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LOOKDEVX-0000 - Fix legacy CM nodes affected by MaterialX 1.38.8 #3481
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
11 changes: 11 additions & 0 deletions
11
...Usd/render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_aces_2065_1_color3.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_aces_2065_1_color3(vec3 _in, out vec3 result) | ||
{ | ||
result = mx_srgb_texture_to_lin_rec709(_in); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
result = mat3(0.43963298, 0.08977644, 0.01754117, | ||
0.38298870, 0.81343943, 0.11154655, | ||
0.17737832, 0.09678413, 0.87091228) * result; | ||
} |
13 changes: 13 additions & 0 deletions
13
...Usd/render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_aces_2065_1_color4.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_aces_2065_1_color4(vec4 _in, out vec4 result) | ||
{ | ||
vec3 color = mx_srgb_texture_to_lin_rec709(_in.rgb); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
color = mat3(0.43963298, 0.08977644, 0.01754117, | ||
0.38298870, 0.81343943, 0.11154655, | ||
0.17737832, 0.09678413, 0.87091228) * color; | ||
|
||
result = vec4(color, _in.a); | ||
} |
11 changes: 11 additions & 0 deletions
11
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_acescg_color3.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_acescg_color3(vec3 _in, out vec3 result) | ||
{ | ||
result = mx_srgb_texture_to_lin_rec709(_in); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
result = mat3(0.61309740, 0.07019372, 0.02061559, | ||
0.33952315, 0.91635388, 0.10956977, | ||
0.04737945, 0.01345240, 0.86981463) * result; | ||
} |
13 changes: 13 additions & 0 deletions
13
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_acescg_color4.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_acescg_color4(vec4 _in, out vec4 result) | ||
{ | ||
vec3 color = mx_srgb_texture_to_lin_rec709(_in.rgb); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
color = mat3(0.61309740, 0.07019372, 0.02061559, | ||
0.33952315, 0.91635388, 0.10956977, | ||
0.04737945, 0.01345240, 0.86981463) * color; | ||
|
||
result = vec4(color, _in.a); | ||
} |
11 changes: 11 additions & 0 deletions
11
.../render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_lin_dci_p3_d65_color3.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_lin_dci_p3_d65_color3(vec3 _in, out vec3 result) | ||
{ | ||
result = mx_srgb_texture_to_lin_rec709(_in); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
result = mat3(0.82246197, 0.03319420, 0.01708263, | ||
0.17753803, 0.96680580, 0.07239744, | ||
0., 0., 0.91051993) * result; | ||
} |
13 changes: 13 additions & 0 deletions
13
.../render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_lin_dci_p3_d65_color4.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_lin_dci_p3_d65_color4(vec4 _in, out vec4 result) | ||
{ | ||
vec3 color = mx_srgb_texture_to_lin_rec709(_in.rgb); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
color = mat3(0.82246197, 0.03319420, 0.01708263, | ||
0.17753803, 0.96680580, 0.07239744, | ||
0., 0., 0.91051993) * color; | ||
|
||
result = vec4(color, _in.a); | ||
} |
11 changes: 11 additions & 0 deletions
11
...aUsd/render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_linrec2020_color3.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_linrec2020_color3(vec3 _in, out vec3 result) | ||
{ | ||
result = mx_srgb_texture_to_lin_rec709(_in); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
result = mat3(0.62740389, 0.06909729, 0.01639144, | ||
0.32928304, 0.91954039, 0.08801331, | ||
0.04331307, 0.01136232, 0.89559525) * result; | ||
} |
13 changes: 13 additions & 0 deletions
13
...aUsd/render/MaterialXGenOgsXml/libraries/1.38.7/mx_srgb_texture_to_linrec2020_color4.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_linrec2020_color4(vec4 _in, out vec4 result) | ||
{ | ||
vec3 color = mx_srgb_texture_to_lin_rec709(_in.rgb); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
color = mat3(0.62740389, 0.06909729, 0.01639144, | ||
0.32928304, 0.91954039, 0.08801331, | ||
0.04331307, 0.01136232, 0.89559525) * color; | ||
|
||
result = vec4(color, _in.a); | ||
} |
32 changes: 32 additions & 0 deletions
32
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/1.38.7/usd_utilities_genglsl_impl.mtlx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38"> | ||
<!-- | ||
Copyright 2022 Autodesk | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
--> | ||
<implementation name="MayaIM_texcoordtangents_vector3_genglsl" nodedef="MayaND_texcoordtangents_vector3" file="libraries/adsk/maya/genglsl/mx_texcoordtangents_vector3.glsl" function="mx_texcoordtangents_vector3" target="genglsl" /> | ||
<implementation name="MayaIM_arbitrarytangents_vector3_genglsl" nodedef="MayaND_arbitrarytangents_vector3" file="libraries/adsk/maya/genglsl/mx_arbitrarytangents_vector3.glsl" function="mx_arbitrarytangents_vector3" target="genglsl" /> | ||
|
||
<implementation name="MayaIM_sRGBtoLinrec709_color3_genglsl" nodedef="MayaND_sRGBtoLinrec709_color3" file="libraries/stdlib/genglsl/mx_srgb_texture_to_lin_rec709_color3.glsl" function="mx_srgb_texture_to_lin_rec709_color3" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoLinrec709_color4_genglsl" nodedef="MayaND_sRGBtoLinrec709_color4" file="libraries/stdlib/genglsl/mx_srgb_texture_to_lin_rec709_color4.glsl" function="mx_srgb_texture_to_lin_rec709_color4" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoACEScg_color3_genglsl" nodedef="MayaND_sRGBtoACEScg_color3" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_acescg_color3.glsl" function="mx_srgb_texture_to_acescg_color3" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoACEScg_color4_genglsl" nodedef="MayaND_sRGBtoACEScg_color4" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_acescg_color4.glsl" function="mx_srgb_texture_to_acescg_color4" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoACES2065_color3_genglsl" nodedef="MayaND_sRGBtoACES2065_color3" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_aces_2065_1_color3.glsl" function="mx_srgb_texture_to_aces_2065_1_color3" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoACES2065_color4_genglsl" nodedef="MayaND_sRGBtoACES2065_color4" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_aces_2065_1_color4.glsl" function="mx_srgb_texture_to_aces_2065_1_color4" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoLinDCIP3D65_color3_genglsl" nodedef="MayaND_sRGBtoLinDCIP3D65_color3" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_lin_dci_p3_d65_color3.glsl" function="mx_srgb_texture_to_lin_dci_p3_d65_color3" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoLinDCIP3D65_color4_genglsl" nodedef="MayaND_sRGBtoLinDCIP3D65_color4" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_lin_dci_p3_d65_color4.glsl" function="mx_srgb_texture_to_lin_dci_p3_d65_color4" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoLinrec2020_color3_genglsl" nodedef="MayaND_sRGBtoLinrec2020_color3" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_linrec2020_color3.glsl" function="mx_srgb_texture_to_linrec2020_color3" target="genglsl" /> | ||
<implementation name="MayaIM_sRGBtoLinrec2020_color4_genglsl" nodedef="MayaND_sRGBtoLinrec2020_color4" file="libraries/adsk/maya/genglsl/mx_srgb_texture_to_linrec2020_color4.glsl" function="mx_srgb_texture_to_linrec2020_color4" target="genglsl" /> | ||
|
||
</materialx> |
4 changes: 2 additions & 2 deletions
4
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_aces_2065_1_color3.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#include "libraries/stdlib/genglsl/lib/mx_transform_color.glsl" | ||
#include "libraries/adsk/maya/genglsl/lib/usd_transform_color.glsl" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Changes requires copying the old mx_transform_color.glsl to MayaUSD since that file no longer exists in 1.38.8. |
||
|
||
void mx_srgb_texture_to_aces_2065_1_color3(vec3 _in, out vec3 result) | ||
{ | ||
result = mx_srgb_texture_to_lin_rec709(_in); | ||
result = usd_srgb_texture_to_lin_rec709(_in); | ||
|
||
// Same matrix as found in ../../vp2ShaderFragments/shaderFragments.cpp | ||
result = mat3(0.43963298, 0.08977644, 0.01754117, | ||
|
4 changes: 2 additions & 2 deletions
4
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_aces_2065_1_color4.glsl
This file contains 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
4 changes: 2 additions & 2 deletions
4
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_acescg_color3.glsl
This file contains 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
4 changes: 2 additions & 2 deletions
4
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_acescg_color4.glsl
This file contains 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
4 changes: 2 additions & 2 deletions
4
...mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_lin_dci_p3_d65_color3.glsl
This file contains 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
4 changes: 2 additions & 2 deletions
4
...mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_lin_dci_p3_d65_color4.glsl
This file contains 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
6 changes: 6 additions & 0 deletions
6
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_lin_rec709_color3.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "libraries/adsk/maya/genglsl/lib/usd_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_lin_rec709_color3(vec3 _in, out vec3 result) | ||
{ | ||
result = usd_srgb_texture_to_lin_rec709(_in); | ||
} |
6 changes: 6 additions & 0 deletions
6
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_lin_rec709_color4.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "libraries/adsk/maya/genglsl/lib/usd_transform_color.glsl" | ||
|
||
void mx_srgb_texture_to_lin_rec709_color4(vec4 _in, out vec4 result) | ||
{ | ||
result = vec4(usd_srgb_texture_to_lin_rec709(_in.rgb), _in.a); | ||
} |
4 changes: 2 additions & 2 deletions
4
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_linrec2020_color3.glsl
This file contains 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
4 changes: 2 additions & 2 deletions
4
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/mx_srgb_texture_to_linrec2020_color4.glsl
This file contains 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
7 changes: 7 additions & 0 deletions
7
lib/mayaUsd/render/MaterialXGenOgsXml/libraries/usd_transform_color.glsl
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
vec3 usd_srgb_texture_to_lin_rec709(vec3 color) | ||
{ | ||
bvec3 isAbove = greaterThan(color, vec3(0.04045)); | ||
vec3 linSeg = color / 12.92; | ||
vec3 powSeg = pow(max(color + vec3(0.055), vec3(0.0)) / 1.055, vec3(2.4)); | ||
return mix(linSeg, powSeg, vec3(isAbove)); | ||
} |
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these new files in the 1.37.7 folder are copies of files modified for 1.38.8 before changes.