Skip to content

Commit

Permalink
Fix shader generation typos
Browse files Browse the repository at this point in the history
This changelist fixes a handful of minor typos in shader generation, introduced in AcademySoftwareFoundation#1355 and AcademySoftwareFoundation#1553.
  • Loading branch information
jstone-lucasfilm committed Jan 17, 2024
1 parent 6773cb5 commit 67a5da5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions libraries/stdlib/genmsl/stdlib_genmsl_impl.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -729,9 +729,9 @@
<implementation name="IM_combine4_vector4_genmsl" nodedef="ND_combine4_vector4" target="genmsl" />

<!-- <creatematrix> -->
<implementation name="IM_creatematrix_vector3_matrix33_genmsl" nodedef="ND_creatematrix_vector3_matrix33" file="../genglsl/mx_creatematrix_vector3_matrix33.glsl" function="mx_creatematrix_vector3_matrix33" nodegroup="genmsl" />
<implementation name="IM_creatematrix_vector3_matrix44_genmsl" nodedef="ND_creatematrix_vector3_matrix44" file="../genglsl/mx_creatematrix_vector3_matrix44.glsl" function="mx_creatematrix_vector3_matrix44" nodegroup="genmsl" />
<implementation name="IM_creatematrix_vector4_matrix44_genmsl" nodedef="ND_creatematrix_vector4_matrix44" file="../genglsl/mx_creatematrix_vector4_matrix44.glsl" function="mx_creatematrix_vector4_matrix44" nodegroup="genmsl" />
<implementation name="IM_creatematrix_vector3_matrix33_genmsl" nodedef="ND_creatematrix_vector3_matrix33" file="../genglsl/mx_creatematrix_vector3_matrix33.glsl" function="mx_creatematrix_vector3_matrix33" target="genmsl" />
<implementation name="IM_creatematrix_vector3_matrix44_genmsl" nodedef="ND_creatematrix_vector3_matrix44" file="../genglsl/mx_creatematrix_vector3_matrix44.glsl" function="mx_creatematrix_vector3_matrix44" target="genmsl" />
<implementation name="IM_creatematrix_vector4_matrix44_genmsl" nodedef="ND_creatematrix_vector4_matrix44" file="../genglsl/mx_creatematrix_vector4_matrix44.glsl" function="mx_creatematrix_vector4_matrix44" target="genmsl" />

<!-- ======================================================================== -->
<!-- Convolution nodes -->
Expand Down
6 changes: 3 additions & 3 deletions libraries/stdlib/genosl/mx_creatematrix.osl
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
void mx_creatematrix_vector3_matrix33(vector in1, vector in2, vector in3, out matrix result)
void mx_creatematrix_vector3_matrix33(vector in1, vector in2, vector in3, output matrix result)
{
result = matrix(in1.x, in1.y, in1.z, 0.0,
in2.x, in2.y, in2.z, 0.0,
in3.x, in3.y, in3.z, 0.0,
0.0, 0.0, 0.0, 1.0);
}

void mx_creatematrix_vector3_matrix44(vector3 in1, vector3 in2, vector3 in3, vector3 in4, out matrix result)
void mx_creatematrix_vector3_matrix44(vector3 in1, vector3 in2, vector3 in3, vector3 in4, output matrix result)
{
result = matrix(in1.x, in1.y, in1.z, 0.0,
in2.x, in2.y, in2.z, 0.0,
in3.x, in3.y, in3.z, 0.0,
in4.x, in4.y, in4.z, 1.0);
}

void mx_creatematrix_vector4_matrix44(vector4 in1, vector4 in2, vector4 in3, vector4 in4, out matrix result)
void mx_creatematrix_vector4_matrix44(vector4 in1, vector4 in2, vector4 in3, vector4 in4, output matrix result)
{
result = matrix(in1.x, in1.y, in1.z, in1.w,
in2.x, in2.y, in2.z, in2.w,
Expand Down
2 changes: 1 addition & 1 deletion libraries/stdlib/genosl/mx_normalmap.osl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ void mx_normalmap_vector2(vector value, string map_space, vector2 normal_scale,
vector v = value * 2.0 - 1.0;
vector T = normalize(U - dot(U, N) * N);
vector B = normalize(cross(N, T));
result = normalize(T * v[0] * normal_scale[0] + B * v[1] * normal_scale[1] + N * v[2]);
result = normalize(T * v[0] * normal_scale.x + B * v[1] * normal_scale.y + N * v[2]);
}
// Object space
else
Expand Down
6 changes: 3 additions & 3 deletions libraries/stdlib/genosl/stdlib_genosl_impl.mtlx
Original file line number Diff line number Diff line change
Expand Up @@ -732,9 +732,9 @@
<implementation name="IM_combine4_vector4_genosl" nodedef="ND_combine4_vector4" target="genosl" />

<!-- <creatematrix> -->
<implementation name="IM_creatematrix_vector3_matrix33_genosl" nodedef="ND_creatematrix_vector3_matrix33" file="mx_creatematrix.osl" function="mx_creatematrix_vector3_matrix33" nodegroup="genosl" />
<implementation name="IM_creatematrix_vector3_matrix44_genosl" nodedef="ND_creatematrix_vector3_matrix44" file="mx_creatematrix.osl" function="mx_creatematrix_vector3_matrix44" nodegroup="genosl" />
<implementation name="IM_creatematrix_vector4_matrix44_genosl" nodedef="ND_creatematrix_vector4_matrix44" file="mx_creatematrix.osl" function="mx_creatematrix_vector4_matrix44" nodegroup="genosl" />
<implementation name="IM_creatematrix_vector3_matrix33_genosl" nodedef="ND_creatematrix_vector3_matrix33" file="mx_creatematrix.osl" function="mx_creatematrix_vector3_matrix33" target="genosl" />
<implementation name="IM_creatematrix_vector3_matrix44_genosl" nodedef="ND_creatematrix_vector3_matrix44" file="mx_creatematrix.osl" function="mx_creatematrix_vector3_matrix44" target="genosl" />
<implementation name="IM_creatematrix_vector4_matrix44_genosl" nodedef="ND_creatematrix_vector4_matrix44" file="mx_creatematrix.osl" function="mx_creatematrix_vector4_matrix44" target="genosl" />

<!-- ======================================================================== -->
<!-- Convolution nodes -->
Expand Down

0 comments on commit 67a5da5

Please sign in to comment.