From 7b0405d7fada65c6d805a85f2ee02e7938a9988f Mon Sep 17 00:00:00 2001 From: Niklas Harrysson Date: Fri, 30 Sep 2022 16:59:43 +0200 Subject: [PATCH] Remove operators 'add' and 'multiply' for shader types (#1089) This change list removes the `add` and `multiply` operator nodes for shader semantic types, as agreed on at the last TSC meeting. --- .../stdlib/genglsl/mx_add_surfaceshader.glsl | 5 - .../mx_multiply_surfaceshader_color3.glsl | 5 - .../mx_multiply_surfaceshader_float.glsl | 5 - .../stdlib/genglsl/stdlib_genglsl_impl.mtlx | 3 - .../stdlib/genmdl/stdlib_genmdl_impl.mtlx | 3 - .../stdlib/genosl/stdlib_genosl_impl.mtlx | 3 - libraries/stdlib/stdlib_defs.mtlx | 45 --------- .../pbrlib/surfaceshader/shader_ops.mtlx | 14 +-- .../MaterialXGenMdl/mdl/materialx/stdlib.mdl | 99 ------------------- .../MaterialXGenGlsl/GenGlsl.cpp | 2 +- .../MaterialXTest/MaterialXGenMdl/GenMdl.cpp | 2 +- .../MaterialXTest/MaterialXGenOsl/GenOsl.cpp | 2 +- .../MaterialXGenShader/GenShaderUtil.cpp | 6 -- 13 files changed, 4 insertions(+), 190 deletions(-) delete mode 100644 libraries/stdlib/genglsl/mx_add_surfaceshader.glsl delete mode 100644 libraries/stdlib/genglsl/mx_multiply_surfaceshader_color3.glsl delete mode 100644 libraries/stdlib/genglsl/mx_multiply_surfaceshader_float.glsl diff --git a/libraries/stdlib/genglsl/mx_add_surfaceshader.glsl b/libraries/stdlib/genglsl/mx_add_surfaceshader.glsl deleted file mode 100644 index bb60c7126d..0000000000 --- a/libraries/stdlib/genglsl/mx_add_surfaceshader.glsl +++ /dev/null @@ -1,5 +0,0 @@ -void mx_add_surfaceshader(surfaceshader shader1, surfaceshader shader2, out surfaceshader returnshader) -{ - returnshader.color = shader1.color + shader2.color; - returnshader.transparency = shader1.transparency + shader2.transparency; -} diff --git a/libraries/stdlib/genglsl/mx_multiply_surfaceshader_color3.glsl b/libraries/stdlib/genglsl/mx_multiply_surfaceshader_color3.glsl deleted file mode 100644 index dfdb041321..0000000000 --- a/libraries/stdlib/genglsl/mx_multiply_surfaceshader_color3.glsl +++ /dev/null @@ -1,5 +0,0 @@ -void mx_multiply_surfaceshader_color3(surfaceshader shader1, vec3 value, out surfaceshader returnshader) -{ - returnshader.color = shader1.color * value; - returnshader.transparency = shader1.transparency; -} diff --git a/libraries/stdlib/genglsl/mx_multiply_surfaceshader_float.glsl b/libraries/stdlib/genglsl/mx_multiply_surfaceshader_float.glsl deleted file mode 100644 index 198b1a10d5..0000000000 --- a/libraries/stdlib/genglsl/mx_multiply_surfaceshader_float.glsl +++ /dev/null @@ -1,5 +0,0 @@ -void mx_multiply_surfaceshader_float(surfaceshader shader1, float value, out surfaceshader returnshader) -{ - returnshader.color = shader1.color * vec3(value); - returnshader.transparency = shader1.transparency * value; -} diff --git a/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx b/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx index 47b95c1990..781f4527c4 100644 --- a/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx +++ b/libraries/stdlib/genglsl/stdlib_genglsl_impl.mtlx @@ -222,7 +222,6 @@ - @@ -255,8 +254,6 @@ - - diff --git a/libraries/stdlib/genmdl/stdlib_genmdl_impl.mtlx b/libraries/stdlib/genmdl/stdlib_genmdl_impl.mtlx index 0f89e7bdcc..bb792523b1 100644 --- a/libraries/stdlib/genmdl/stdlib_genmdl_impl.mtlx +++ b/libraries/stdlib/genmdl/stdlib_genmdl_impl.mtlx @@ -224,7 +224,6 @@ - @@ -257,8 +256,6 @@ - - diff --git a/libraries/stdlib/genosl/stdlib_genosl_impl.mtlx b/libraries/stdlib/genosl/stdlib_genosl_impl.mtlx index b7a1b0363c..73bc5d709d 100644 --- a/libraries/stdlib/genosl/stdlib_genosl_impl.mtlx +++ b/libraries/stdlib/genosl/stdlib_genosl_impl.mtlx @@ -225,7 +225,6 @@ - @@ -258,8 +257,6 @@ - - diff --git a/libraries/stdlib/stdlib_defs.mtlx b/libraries/stdlib/stdlib_defs.mtlx index d1f8c29468..1b8a3ca7b3 100644 --- a/libraries/stdlib/stdlib_defs.mtlx +++ b/libraries/stdlib/stdlib_defs.mtlx @@ -1185,21 +1185,6 @@ - - - - - - - - - - - - - - - @@ -1386,36 +1371,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -