Skip to content

Commit 6ac5ef4

Browse files
authored
Merge branch 'AcademySoftwareFoundation:main' into uri_for_viewer
2 parents 38c3633 + 92bfb86 commit 6ac5ef4

75 files changed

Lines changed: 2461 additions & 656 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ jobs:
115115
cmake_config: -G "Visual Studio 17 2022" -A "x64"
116116
test_shaders: ON
117117
extended_build_oiio: ON
118+
extended_build_mdl_sdk: ON
118119

119120
- name: Windows_VS2022_x64_SharedLibs
120121
os: windows-2025
@@ -167,6 +168,12 @@ jobs:
167168
C:/vcpkg/vcpkg install openimageio --triplet=x64-windows
168169
Add-Content $env:GITHUB_PATH "C:/vcpkg/installed/x64-windows/bin"
169170
171+
- name: Install MDL SDK
172+
if: env.IS_EXTENDED_BUILD == 'true' && matrix.extended_build_mdl_sdk == 'ON' && runner.os == 'Windows'
173+
run: |
174+
C:/vcpkg/vcpkg install mdl-sdk --triplet=x64-windows
175+
Add-Content $env:GITHUB_PATH "C:/vcpkg/installed/x64-windows/bin"
176+
170177
- name: Install Python ${{ matrix.python }}
171178
if: matrix.python != 'None'
172179
uses: actions/setup-python@v5
@@ -185,8 +192,16 @@ jobs:
185192
- name: CMake Generate
186193
shell: bash
187194
run: |
188-
if [ "${{ env.IS_EXTENDED_BUILD }}" == "true" ] && [ "${{ matrix.extended_build_oiio }}" == "ON" ]; then
189-
EXTENDED_BUILD_CONFIG="-DMATERIALX_BUILD_OIIO=ON -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows"
195+
if [ "${{ env.IS_EXTENDED_BUILD }}" == "true" ]; then
196+
if [ "${{ runner.os }}" == "Windows" ]; then
197+
EXTENDED_BUILD_CONFIG="-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows"
198+
fi
199+
if [ "${{ matrix.extended_build_oiio }}" == "ON" ]; then
200+
EXTENDED_BUILD_CONFIG="$EXTENDED_BUILD_CONFIG -DMATERIALX_BUILD_OIIO=ON"
201+
fi
202+
if [ "${{ matrix.extended_build_mdl_sdk }}" == "ON" -a "${{ runner.os }}" == "Windows" ]; then
203+
EXTENDED_BUILD_CONFIG="$EXTENDED_BUILD_CONFIG -DMATERIALX_MDL_SDK_DIR=C:/vcpkg/installed/x64-windows"
204+
fi
190205
fi
191206
cmake -S . -B build -DMATERIALX_BUILD_PYTHON=ON -DMATERIALX_BUILD_VIEWER=ON -DMATERIALX_BUILD_GRAPH_EDITOR=ON -DMATERIALX_BUILD_TESTS=ON -DMATERIALX_TEST_RENDER=OFF -DMATERIALX_WARNINGS_AS_ERRORS=ON $EXTENDED_BUILD_CONFIG ${{matrix.cmake_config}}
192207

CMakeLists.txt

Lines changed: 31 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
1414
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/lib)
1515
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)
1616

17-
# JavaScript setup
17+
# JavaScript setup
1818
option(MATERIALX_BUILD_JS "Build the MaterialX JavaScript package from C++ bindings. Requires the emscripten environment." OFF)
1919
set(MATERIALX_EMSDK_PATH "" CACHE PATH "Path to EMSDK (e.g. 'D:/Projects/emsdk').")
2020
if (MATERIALX_BUILD_JS)
@@ -39,7 +39,7 @@ option(MATERIALX_BUILD_GRAPH_EDITOR "Build the MaterialX Graph Editor." OFF)
3939
option(MATERIALX_BUILD_DOCS "Create HTML documentation using Doxygen. Requires that Doxygen be installed." OFF)
4040

4141
option(MATERIALX_BUILD_GEN_GLSL "Build the GLSL shader generator back-end." ON)
42-
option(MATERIALX_BUILD_GEN_OSL "Build the OSL shader generator back-end." ON)
42+
option(MATERIALX_BUILD_GEN_OSL "Build the OSL shader generator back-ends." ON)
4343
option(MATERIALX_BUILD_GEN_MDL "Build the MDL shader generator back-end." ON)
4444
option(MATERIALX_BUILD_GEN_MSL "Build the MSL shader generator back-end." ON)
4545
option(MATERIALX_BUILD_RENDER "Build the MaterialX Render modules." ON)
@@ -48,6 +48,7 @@ option(MATERIALX_BUILD_OIIO "Build OpenImageIO support for MaterialXRender." OFF
4848
option(MATERIALX_BUILD_OCIO "Build OpenColorIO support for shader generators." OFF)
4949
option(MATERIALX_BUILD_TESTS "Build unit tests." OFF)
5050
option(MATERIALX_BUILD_BENCHMARK_TESTS "Build benchmark tests." OFF)
51+
option(MATERIALX_BUILD_OSOS "Build OSL .oso's of standard library shaders for the OSL Network generator" OFF)
5152

5253
option(MATERIALX_BUILD_SHARED_LIBS "Build MaterialX libraries as shared rather than static." OFF)
5354
option(MATERIALX_BUILD_DATA_LIBRARY "Build generated products from the MaterialX data library." OFF)
@@ -85,6 +86,7 @@ if (CMAKE_SYSTEM_NAME MATCHES "iOS" OR CMAKE_SYSTEM_NAME MATCHES "tvOS" OR CMAKE
8586
set(MATERIALX_BUILD_GEN_GLSL OFF)
8687
set(MATERIALX_BUILD_GEN_OSL OFF)
8788
set(MATERIALX_BUILD_GEN_MDL OFF)
89+
set(MATERIALX_BUILD_OSOS OFF)
8890
set(MATERIALX_BUILD_TESTS OFF)
8991
endif()
9092

@@ -103,6 +105,7 @@ if (MATERIALX_BUILD_APPLE_FRAMEWORK)
103105
endif()
104106

105107
if (MATERIALX_BUILD_JS)
108+
set(MATERIALX_BUILD_OSOS OFF)
106109
set(MATERIALX_BUILD_RENDER OFF)
107110
set(MATERIALX_BUILD_TESTS OFF)
108111
endif()
@@ -136,15 +139,17 @@ if(SKBUILD)
136139
set(MATERIALX_PYTHON_FOLDER_NAME "MaterialX")
137140
endif()
138141

139-
# Helpers for MDL validation
140-
if (MATERIALX_BUILD_GEN_MDL)
141-
set(MATERIALX_MDLC_EXECUTABLE "" CACHE FILEPATH "Full path to the mdlc binary.")
142-
set(MATERIALX_MDL_RENDER_EXECUTABLE "" CACHE FILEPATH "Full path to the mdl renderer binary.")
143-
set(MATERIALX_MDL_RENDER_ARGUMENTS "" CACHE STRING "Custom arguments for renderer.")
144-
set(MATERIALX_MDL_MODULE_PATHS "" CACHE FILEPATH "Comma separated list of MDL module paths.")
145-
set(MATERIALX_INSTALL_MDL_MODULE_PATH ${MATERIALX_INSTALL_STDLIB_PATH} CACHE FILEPATH "Install path for mdl module.")
142+
if (MATERIALX_BUILD_OSOS)
143+
set(MATERIALX_BUILD_DATA_LIBRARY ON)
144+
set(MATERIALX_BUILD_GEN_OSL ON)
145+
set(MATERIALX_BUILD_RENDER ON)
146+
set(MATERIALX_BUILD_RENDER_PLATFORMS ON)
146147
endif()
147148

149+
# Helpers for MDL validation
150+
set(MATERIALX_MDL_SDK_DIR "" CACHE PATH "Path to the MDL SDK directory that contains 'include', 'lib', etc.")
151+
set(MATERIALX_MDL_MODULE_PATHS "" CACHE FILEPATH "Comma separated list of MDL module paths.")
152+
148153
# Namespace
149154
set(MATERIALX_NAMESPACE_SUFFIX "" CACHE STRING "Add a suffix to the main MaterialX C++ namespace: Options include dev, staging, <YOURFACILITY> etc.")
150155
if(MATERIALX_NAMESPACE_SUFFIX STREQUAL "")
@@ -164,6 +169,7 @@ mark_as_advanced(MATERIALX_BUILD_GEN_GLSL)
164169
mark_as_advanced(MATERIALX_BUILD_GEN_OSL)
165170
mark_as_advanced(MATERIALX_BUILD_GEN_MDL)
166171
mark_as_advanced(MATERIALX_BUILD_GEN_MSL)
172+
mark_as_advanced(MATERIALX_BUILD_OSOS)
167173
mark_as_advanced(MATERIALX_BUILD_RENDER)
168174
mark_as_advanced(MATERIALX_BUILD_RENDER_PLATFORMS)
169175
mark_as_advanced(MATERIALX_BUILD_OIIO)
@@ -196,13 +202,9 @@ mark_as_advanced(MATERIALX_BUILD_JS)
196202
mark_as_advanced(MATERIALX_EMSDK_PATH)
197203
mark_as_advanced(MATERIALX_BUILD_IOS)
198204
mark_as_advanced(MATERIALX_BUILD_APPLE_FRAMEWORK)
199-
if (MATERIALX_BUILD_GEN_MDL)
200-
mark_as_advanced(MATERIALX_MDLC_EXECUTABLE)
201-
mark_as_advanced(MATERIALX_MDL_RENDER_EXECUTABLE)
202-
mark_as_advanced(MATERIALX_MDL_RENDER_ARGUMENTS)
203-
mark_as_advanced(MATERIALX_MDL_MODULE_PATHS)
204-
mark_as_advanced(MATERIALX_INSTALL_MDL_MODULE_PATH)
205-
endif()
205+
mark_as_advanced(MATERIALX_MDL_BINARY_MDLC)
206+
mark_as_advanced(MATERIALX_MDL_MODULE_PATHS)
207+
mark_as_advanced(MATERIALX_MDL_SDK_DIR)
206208

207209
if (MATERIALX_BUILD_USE_CCACHE)
208210
# Setup CCache for C/C++ compilation
@@ -215,7 +217,7 @@ endif()
215217

216218
# Allow the OSL CMake package to provide binary locations for render tests.
217219
# This will not override explicitly provided oslc, testrender, and include paths.
218-
if(MATERIALX_BUILD_RENDER AND MATERIALX_BUILD_GEN_OSL AND MATERIALX_BUILD_TESTS)
220+
if((MATERIALX_BUILD_RENDER AND MATERIALX_BUILD_GEN_OSL AND MATERIALX_BUILD_TESTS) OR MATERIALX_BUILD_OSOS)
219221
find_package(OSL QUIET)
220222
if(OSL_FOUND)
221223
if(NOT MATERIALX_OSL_BINARY_OSLC)
@@ -225,6 +227,10 @@ if(MATERIALX_BUILD_RENDER AND MATERIALX_BUILD_GEN_OSL AND MATERIALX_BUILD_TESTS)
225227
# OSL does not yet export a CMake target for testrender.
226228
set(MATERIALX_OSL_BINARY_TESTRENDER $<TARGET_FILE_DIR:OSL::oslc>/testrender)
227229
endif()
230+
if(NOT MATERIALX_OSL_INCLUDE_PATH)
231+
# OSL does not yet export a CMake target for testrender.
232+
set(MATERIALX_OSL_INCLUDE_PATH $<TARGET_FILE_DIR:OSL::oslc>/../include)
233+
endif()
228234
endif()
229235
endif()
230236

@@ -236,12 +242,11 @@ if (MATERIALX_BUILD_BENCHMARK_TESTS)
236242
add_definitions(-DMATERIALX_BUILD_BENCHMARK_TESTS)
237243
endif()
238244

239-
if (MATERIALX_BUILD_GEN_MDL)
240-
add_definitions(-DMATERIALX_MDLC_EXECUTABLE=\"${MATERIALX_MDLC_EXECUTABLE}\")
241-
add_definitions(-DMATERIALX_MDL_RENDER_EXECUTABLE=\"${MATERIALX_MDL_RENDER_EXECUTABLE}\")
242-
add_definitions(-DMATERIALX_MDL_RENDER_ARGUMENTS=\"${MATERIALX_MDL_RENDER_ARGUMENTS}\")
243-
add_definitions(-DMATERIALX_MDL_MODULE_PATHS=\"${MATERIALX_MDL_MODULE_PATHS}\")
244-
add_definitions(-DMATERIALX_INSTALL_MDL_MODULE_PATH=\"${MATERIALX_INSTALL_MDL_MODULE_PATH}\")
245+
# GEN MDL does not have any additional dependencies. For loading and compiling MDL, e.g., in the test renderer, the MDL SDK is needed.
246+
if(MATERIALX_MDL_SDK_DIR)
247+
find_package(mdl QUIET CONFIG REQUIRED PATHS ${MATERIALX_MDL_SDK_DIR})
248+
get_target_property(MATERIALX_MDL_BINARY_MDLC mdl::mdlc LOCATION)
249+
set(MATERIALX_MDL_BINARY_MDLC ${MATERIALX_MDL_BINARY_MDLC} CACHE FILEPATH "Full path to the mdlc binary." FORCE)
245250
endif()
246251

247252
# Adjust the default installation path
@@ -467,6 +472,9 @@ if(MATERIALX_BUILD_GEN_GLSL OR MATERIALX_BUILD_GEN_OSL OR MATERIALX_BUILD_GEN_MD
467472
add_definitions(-DMATERIALX_BUILD_GEN_OSL)
468473
add_subdirectory(source/MaterialXGenOsl)
469474
endif()
475+
if (MATERIALX_BUILD_OSOS)
476+
add_definitions(-DMATERIALX_BUILD_OSOS)
477+
endif()
470478
if (MATERIALX_BUILD_GEN_MDL)
471479
add_definitions(-DMATERIALX_BUILD_GEN_MDL)
472480
add_subdirectory(source/MaterialXGenMdl)

CONTRIBUTING.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -200,13 +200,13 @@ with these guidelines.
200200
#### Naming Conventions
201201

202202
Class names should use PascalCase, as in `NodeGraph` or `ShaderGenerator`.
203-
Method names should use camelCase starting with a lowercase letter, for
204-
example `getNode` or `setName`. Protected and private member variables should
205-
use an underscore prefix, such as `_name` or `_parent`. Constants should be
206-
written in UPPER_CASE with underscores separating words, as in `EMPTY_STRING`
207-
or `CATEGORY`. Type aliases should append appropriate suffixes to indicate
208-
their purpose, using `Ptr` for pointers, `Vec` for vectors, `Map` for maps,
209-
and `Set` for sets.
203+
Variable and function names should use camelCase starting with a lowercase
204+
letter, as in `childName` or `getNode`. Protected and private member variables
205+
additionally require an underscore prefix, as in `_parent` or `_childMap`.
206+
Constants should be written in UPPER_CASE with underscores separating words,
207+
as in `EMPTY_STRING` or `CATEGORY`. Type aliases should append appropriate
208+
suffixes to indicate their purpose, using `Ptr` for pointers, `Vec` for
209+
vectors, `Map` for maps, and `Set` for sets.
210210

211211
#### Static Constants and Class Organization
212212

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ MaterialX is an open standard for representing rich material and look-developmen
1717
- Point CMake to the root of the MaterialX library and generate C++ projects for your platform and compiler.
1818
- Select the `MATERIALX_BUILD_PYTHON` option to build Python bindings.
1919
- Select the `MATERIALX_BUILD_VIEWER` option to build the [MaterialX Viewer](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/DeveloperGuide/Viewer.md).
20-
- Select the `MATERIALX_BUILD_GRAPH_EDITOR` option to build the [MaterialX Graph Editor](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/DeveloperGuide/GraphEditor.md).
20+
- Select the `MATERIALX_BUILD_GRAPH_EDITOR` option to build the [MaterialX Graph Editor](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/documents/DeveloperGuide/GraphEditor.md).
2121

2222
## Supported Platforms
2323

documents/Specification/MaterialX.Specification.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Because the same word can be used to mean slightly different things in different
9999

100100
An **Element** is a named object within a MaterialX document, which may possess any number of child elements and attributes. An **Attribute** is a named property of a MaterialX element.
101101

102-
A **Node** is a function that generates or operates upon spatially-varying data. This specification provides a set of standard nodes with precise definitions, and also supports the creation of custom nodes for application-specific uses. The interface for a node’s incoming data is declared through **Inputs**, which may be spatially-varying or uniform, and **Tokens**, which are string values that can be substituted into filenames declared in node inputs.
102+
A **Node** is a function that generates or operates upon spatially-varying data. This specification provides a set of standard nodes with precise definitions, and also supports the creation of custom nodes for application-specific uses. The interface for a node’s incoming data is declared through **Inputs**, which may be spatially-varying or uniform, and **Tokens**, which are string values that can be substituted into filenames declared in node inputs. The interface for a node's outgoing data is declared through one or more **Outputs**; a node's Inputs, Tokens and Outputs are collectively referred to as the node's **Ports**.
103103

104104
A **Pattern** is a node that generates or processes simple scalar, vector, and color data, and has access to local properties of any geometry that has been bound.
105105

@@ -937,7 +937,7 @@ Specific applications will commonly support sources and operators that do not ma
937937

938938
### Custom Node Declaration NodeDef Elements
939939

940-
Each custom node must be explicitly declared with a &lt;nodedef> element, with child &lt;input>, &lt;token> and &lt;output> elements specifying the expected names and types of the node’s inputs and output(s).
940+
Each custom node must be explicitly declared with a &lt;nodedef> element, with child &lt;input>, &lt;token> and &lt;output> elements specifying the expected names and types of the node’s ports.
941941

942942
Attributes for &lt;nodedef> elements:
943943

documents/Specification/MaterialX.StandardNodes.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,23 @@ The type of the &lt;image> node determines the number of channels output, which
102102
* `viewdir` (vector3): the view direction determining the value sampled from the projected equiangular map.
103103
* `rotation` (float): the longitudinal sampling offset, in degrees.
104104

105+
<a id="node-hextiledimage"> </a>
106+
107+
* **`hextiledimage`**: samples data from a single image, with provisions for hex-tiling and randomizing the image across uv space.
108+
* `file` (uniform filename): the URI of an image file. The filename can include one or more substitutions to change the file name (including frame number) that is accessed, as described in the [Filename Substitutions](./MaterialX.Specification.md#filename-substitutions) section in the main Specification document.
109+
* `default` (color<em>N</em>): a default value to use if the `file` reference can not be resolved (e.g. if a &lt;geomtoken>, [interfacetoken] or {hostattr} is included in the filename but no substitution value or default is defined, or if the resolved file URI cannot be read). The `default` value must be the same type as the `<hextiledimage>` element itself. If `default` is not defined, the default color value will be 0.0 in all channels.
110+
* `texcoord` (vector2): the name of a vector2-type node specifying the 2D texture coordinate at which the image data is read. Default is to use the current u,v coordinate.
111+
* `tiling` (vector2): the tiling rate for the hexagon tiles along the U and V axes. Default value is (1.0, 1.0).
112+
* `rotation` (float): per-tile rotation randomness in degrees. Default is 0.0.
113+
* `rotationrange` (vector2): [min, max] range in degrees used to randomize rotation for each tile. Default is (0.0, 360.0).
114+
* `scale` (float): per-tile scale randomness multiplier applied to tile size. Default is 1.0.
115+
* `scalerange` (vector2): [min, max] range of scale multipliers used to randomize tile scale. Default is (0.5, 2.0).
116+
* `offset` (float): per-tile translation randomness in UV units. Default is 0.0.
117+
* `offsetrange` (vector2): [min, max] range of offset values in UV units used to randomize tile positions. Default is (0.0, 1.0).
118+
* `falloff` (float): falloff width used to blend neighboring tiles at their edges; larger values produce smoother blends. Default is 0.5.
119+
* `falloffcontrast` (float): contrast applied to the falloff blending to sharpen (values >1) or soften (values <1) transitions. Default is 0.5.
120+
* `lumacoeffs` (uniform color3): the luma coefficients of the current working color space; if no specific color space can be determined, the ACEScg (ap1) luma coefficients [0.2722287, 0.6740818, 0.0536895] will be used. Applications which support color management systems may choose to retrieve the luma coefficients of the working colorspace from the CMS to pass to the &lt;luminance> node's implementation directly, rather than exposing it to the user.
121+
105122
<a id="node-triplanarprojection"> </a>
106123

107124
* **`triplanarprojection`** (NG): samples data from three images (or layers within multi-layer images), and projects a tiled representation of the images along each of the three respective coordinate axes, computing a weighted blend of the three samples using the geometric normal.
@@ -767,6 +784,26 @@ Math nodes have one or two spatially-varying inputs, and are used to perform a m
767784
* `tangent` (vector3): surface tangent vector, defaults to the current world-space tangent vector.
768785
* `bitangent` (vector3): surface bitangent vector, defaults to the current world-space bitangent vector.
769786

787+
<a id="node-hextilednormalmap"> </a>
788+
789+
* **`hextilednormalmap`**: samples data from a single normalmap, with provisions for hex-tiling and randomizing the normalmap across uv space.
790+
* `file` (uniform filename): the URI of an image file. The filename can include one or more substitutions to change the file name (including frame number) that is accessed, as described in the [Filename Substitutions](./MaterialX.Specification.md#filename-substitutions) section in the main Specification document.
791+
* `default` (vector3): a default value to use if the `file` reference can not be resolved (e.g. if a &lt;geomtoken>, [interfacetoken] or {hostattr} is included in the filename but no substitution value or default is defined, or if the resolved file URI cannot be read). Default is (0.5, 0.5, 1.0).
792+
* `texcoord` (vector2): the name of a vector2-type node specifying the 2D texture coordinate at which the image data is read. Default is to use the current u,v coordinate.
793+
* `tiling` (vector2): the tiling rate for the hexagon tiles along the U and V axes. Default value is (1.0, 1.0).
794+
* `rotation` (float): per-tile rotation randomness in degrees. Default is 0.0.
795+
* `rotationrange` (vector2): [min, max] range in degrees used to randomize rotation for each tile. Default is (0.0, 360.0).
796+
* `scale` (float): per-tile scale randomness multiplier applied to tile size. Default is 1.0.
797+
* `scalerange` (vector2): [min, max] range of scale multipliers used to randomize tile scale. Default is (0.5, 2.0).
798+
* `offset` (float): per-tile translation randomness in UV units. Default is 0.0.
799+
* `offsetrange` (vector2): [min, max] range of offset values in UV units used to randomize tile positions. Default is (0.0, 1.0).
800+
* `falloff` (float): falloff width used to blend neighboring tiles at their edges; larger values produce smoother blends. Default is 0.5.
801+
* `strength` (float): Controls how strongly the sampled normal map affects the final normal. A value of 0.0 leaves the surface normal unchanged, 1.0 applies the sampled normal at full strength, and values >1.0 amplify the normal perturbation. Default is 1.0.
802+
* `flip_g` (boolean): If true, negate (flip) the green (G) channel of the sampled normal map to accommodate different tangent-space conventions (handedness). Default is false.
803+
* `normal` (vector3): surface normal; defaults to the current world-space normal.
804+
* `tangent` (vector3): surface tangent vector, defaults to the current world-space tangent vector.
805+
* `bitangent` (vector3): surface bitangent vector, defaults to the current world-space bitangent vector.
806+
770807
<a id="node-creatematrix"> </a>
771808

772809
* **`creatematrix`**: build a 3x3 or 4x4 matrix from three vector3 or four vector3 or vector4 inputs. A matrix44 may also be created from vector3 input values, in which case the fourth value will be set to 0.0 for in1-in3, and to 1.0 for in4 when creating the matrix44.

0 commit comments

Comments
 (0)