-
Notifications
You must be signed in to change notification settings - Fork 347
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add lots of new MaterialX 1.36 support
Add sin, cos, tan, atan2, ceil, sqrt, exp, determinent, ln, and transpose operators Rename exponent operator to power Rename pack to combine add extract operator Add conversion operators: color2->vector2 color->vector color4->vector4 vector2->color2 vector->color vector4->color4 Matrix inversion operator.
- Loading branch information
1 parent
de63270
commit 4d3d0c4
Showing
29 changed files
with
485 additions
and
60 deletions.
There are no files selected for viewing
Binary file not shown.
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
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
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,17 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_acos_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" acos(in)" ]] | ||
( | ||
TYPE in = TYPE_DEFAULT_IN, | ||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = acos(in); | ||
} |
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,17 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_asin_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" asin(in)" ]] | ||
( | ||
TYPE in = TYPE_DEFAULT_IN, | ||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = asin(in); | ||
} |
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,19 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_atan2_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" atan2(in1, in2)" ]] | ||
( | ||
TYPE in1 = TYPE_DEFAULT_IN, | ||
TYPE in2 = TYPE_DEFAULT_IN, | ||
|
||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = atan2(in1, in2); | ||
} |
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,19 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_atan2_float_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" atan2(in1, in2)" ]] | ||
( | ||
TYPE in1 = TYPE_DEFAULT_IN, | ||
float in2 = 0.0, | ||
|
||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = atan2(in1, in2); | ||
} |
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,17 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_ceil_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" Find the smallest integer less than or equal to the parameter." ]] | ||
( | ||
TYPE in = TYPE_DEFAULT_IN, | ||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = ceil(in); | ||
} |
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
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
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
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
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
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,17 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_cos_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" cos(in)" ]] | ||
( | ||
TYPE in = TYPE_DEFAULT_IN, | ||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = cos(in); | ||
} |
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,17 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader mx_determinant_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" the determinant of matrix in" ]] | ||
( | ||
TYPE in = TYPE_DEFAULT_IN, | ||
output float out = 0 | ||
) | ||
{ | ||
out = determinant(in); | ||
} |
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,17 @@ | ||
// Open Shading Language : Copyright (c) 2009-2017 Sony Pictures Imageworks Inc., et al. | ||
// https://github.com/imageworks/OpenShadingLanguage/blob/master/LICENSE | ||
// | ||
// MaterialX specification (c) 2017 Lucasfilm Ltd. | ||
// http://www.materialx.org/ | ||
|
||
#include "mx_funcs.h" | ||
|
||
shader exp_TYPE_SUFFIX | ||
[[ string help = TYPE_STR" e(in)" ]] | ||
( | ||
TYPE in = TYPE_DEFAULT_IN, | ||
output TYPE out = TYPE_DEFAULT_OUT | ||
) | ||
{ | ||
out = exp(in); | ||
} |
Oops, something went wrong.