Skip to content

Commit

Permalink
Updates for OSL shader generation (#2153)
Browse files Browse the repository at this point in the history
This changelist updates OSL shader generation to account for recent feature contributions (e.g. worleynoise, geompropvalueuniform), allowing render comparisons to complete successfully.
  • Loading branch information
jstone-lucasfilm authored Dec 20, 2024
1 parent cab1b26 commit 73f5f39
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_worleynoise2d_float.osl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void mx_worleynoise2d_float(vector2 texcoord, float jitter, output float result)
void mx_worleynoise2d_float(vector2 texcoord, float jitter, int style, output float result)
{
result = mx_worley_noise_float(texcoord, jitter, 0);
}
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_worleynoise2d_vector2.osl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void mx_worleynoise2d_vector2(vector2 texcoord, float jitter, output vector2 result)
void mx_worleynoise2d_vector2(vector2 texcoord, float jitter, int style, output vector2 result)
{
result = mx_worley_noise_vector2(texcoord, jitter, 0);
}
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_worleynoise2d_vector3.osl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void mx_worleynoise2d_vector3(vector2 texcoord, float jitter, output vector result)
void mx_worleynoise2d_vector3(vector2 texcoord, float jitter, int style, output vector result)
{
result = mx_worley_noise_vector3(texcoord, jitter, 0);
}
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_worleynoise3d_float.osl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void mx_worleynoise3d_float(vector position, float jitter, output float result)
void mx_worleynoise3d_float(vector position, float jitter, int style, output float result)
{
result = mx_worley_noise_float(position, jitter, 0);
}
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_worleynoise3d_vector2.osl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void mx_worleynoise3d_vector2(vector position, float jitter, output vector2 result)
void mx_worleynoise3d_vector2(vector position, float jitter, int style, output vector2 result)
{
result = mx_worley_noise_vector2(position, jitter, 0);
}
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_worleynoise3d_vector3.osl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
void mx_worleynoise3d_vector3(vector position, float jitter, output vector result)
void mx_worleynoise3d_vector3(vector position, float jitter, int style, output vector result)
{
result = mx_worley_noise_vector3(position, jitter, 0);
}
3 changes: 2 additions & 1 deletion source/MaterialXTest/MaterialXRenderOsl/GenReference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ TEST_CASE("GenReference: OSL Reference", "[genreference]")
// Generate reference shaders.
// Ignore the following nodes:
const mx::StringSet ignoreNodeList = { "surfacematerial", "volumematerial",
"constant_filename", "dot_filename"};
"constant_filename", "dot_filename",
"geompropvalueuniform_filename" };

bool failedGeneration = false;
for (const mx::NodeDefPtr& nodedef : stdlib->getNodeDefs())
Expand Down

0 comments on commit 73f5f39

Please sign in to comment.