-
Notifications
You must be signed in to change notification settings - Fork 352
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into zicher3d/patterns
- Loading branch information
Showing
37 changed files
with
327 additions
and
224 deletions.
There are no files selected for viewing
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,34 @@ | ||
|
||
#define MATERIALX_FILEVERSION @MATERIALX_MAJOR_VERSION@,@MATERIALX_MINOR_VERSION@,@MATERIALX_BUILD_VERSION@,0 | ||
#define MATERIALX_FILEVERSION_STR "@MATERIALX_MAJOR_VERSION@.@MATERIALX_MINOR_VERSION@.@MATERIALX_BUILD_VERSION@.0\0" | ||
#define MATERIALX_FILENAME_STR "@MATERIALX_MODULE_NAME@.dll\0" | ||
|
||
1 VERSIONINFO | ||
FILEVERSION MATERIALX_FILEVERSION | ||
PRODUCTVERSION MATERIALX_FILEVERSION | ||
FILEFLAGSMASK 0x3fL | ||
#ifdef _DEBUG | ||
FILEFLAGS 0x1L | ||
#else | ||
FILEFLAGS 0x0L | ||
#endif | ||
FILEOS 0x4L | ||
FILETYPE 0x1L | ||
FILESUBTYPE 0x0L | ||
BEGIN | ||
BLOCK "StringFileInfo" | ||
BEGIN | ||
BLOCK "040904E4" | ||
BEGIN | ||
VALUE "FileVersion", MATERIALX_FILEVERSION_STR | ||
VALUE "LegalCopyright", "Apache License 2.0\0" | ||
VALUE "OriginalFilename", MATERIALX_FILENAME_STR | ||
VALUE "ProductName", "MaterialX\0" | ||
VALUE "ProductVersion", MATERIALX_FILEVERSION_STR | ||
END | ||
END | ||
BLOCK "VarFileInfo" | ||
BEGIN | ||
VALUE "Translation", 0x409, 1252 | ||
END | ||
END |
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
10 changes: 10 additions & 0 deletions
10
resources/Materials/TestSuite/stdlib/nodegraph_inputs/top_level_input.mtlx
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,10 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38" colorspace="lin_rec709"> | ||
<surfacematerial name="surfacematerial" type="material" xpos="17.246376" ypos="-15.689655"> | ||
<input name="surfaceshader" type="surfaceshader" nodename="surface_unlit" /> | ||
</surfacematerial> | ||
<input name="input_color3" type="color3" value="0, 0, 1" xpos="10.905797" ypos="-15.982759" /> | ||
<surface_unlit name="surface_unlit" type="surfaceshader" xpos="14.231884" ypos="-16.241379"> | ||
<input name="emission_color" type="color3" interfacename="input_color3" /> | ||
</surface_unlit> | ||
</materialx> |
36 changes: 36 additions & 0 deletions
36
resources/Materials/TestSuite/stdlib/texture/image_default.mtlx
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,36 @@ | ||
<?xml version="1.0"?> | ||
<materialx version="1.38" colorspace="lin_rec709"> | ||
<!-- | ||
Validation of default color fallbacks for missing image files. | ||
--> | ||
<image name="image_color4" type="color4"> | ||
<input name="file" type="filename" value="resources/Images/invalid.png" /> | ||
<input name="default" type="color4" value="0.8, 0.2, 0.2, 1.0" /> | ||
</image> | ||
<output name="image_color4_output" type="color4" nodename="image_color4" /> | ||
<image name="image_color3" type="color3"> | ||
<input name="file" type="filename" value="resources/Images/invalid.png" /> | ||
<input name="default" type="color3" value="0.8, 0.2, 0.2" /> | ||
</image> | ||
<output name="image_color3_output" type="color3" nodename="image_color3" /> | ||
<image name="image_vector4" type="vector4"> | ||
<input name="file" type="filename" value="resources/Images/invalid.png" /> | ||
<input name="default" type="vector4" value="0.8, 0.2, 0.2, 1.0" /> | ||
</image> | ||
<output name="image_vector4_output" type="vector4" nodename="image_vector4" /> | ||
<image name="image_vector3" type="vector3"> | ||
<input name="file" type="filename" value="resources/Images/invalid.png" /> | ||
<input name="default" type="vector3" value="0.8, 0.2, 0.2" /> | ||
</image> | ||
<output name="image_vector3_output" type="vector3" nodename="image_vector3" /> | ||
<image name="image_vector2" type="vector2"> | ||
<input name="file" type="filename" value="resources/Images/invalid.png" /> | ||
<input name="default" type="vector2" value="0.8, 0.2" /> | ||
</image> | ||
<output name="image_vector2_output" type="vector2" nodename="image_vector2" /> | ||
<image name="image_float" type="float"> | ||
<input name="file" type="filename" value="resources/Images/invalid.png" /> | ||
<input name="default" type="float" value="0.8" /> | ||
</image> | ||
<output name="image_float_output" type="float" nodename="image_float" /> | ||
</materialx> |
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 |
---|---|---|
@@ -1,40 +1,48 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXCore) | ||
|
||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Generated.h.in ${CMAKE_CURRENT_BINARY_DIR}/Generated.h) | ||
|
||
file(GLOB materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h" "${CMAKE_CURRENT_BINARY_DIR}/*.h") | ||
|
||
add_library(MaterialXCore ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_CORE_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXCore PROPERTIES | ||
OUTPUT_NAME MaterialXCore${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXCore | ||
${MATERIALX_MODULE_NAME} | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXCore | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
install(TARGETS MaterialXCore | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(FILES ${materialx_headers} | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXCore/) | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/) | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXCore.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) |
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 |
---|---|---|
@@ -1,43 +1,51 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXFormat) | ||
|
||
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") | ||
|
||
assign_source_group("Source Files" ${materialx_source}) | ||
assign_source_group("Header Files" ${materialx_headers}) | ||
|
||
add_library(MaterialXFormat ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_FORMAT_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXFormat PROPERTIES | ||
OUTPUT_NAME MaterialXFormat${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
INSTALL_RPATH "${MATERIALX_SAME_DIR_RPATH}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXFormat | ||
${MATERIALX_MODULE_NAME} | ||
MaterialXCore | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXFormat | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
install(TARGETS MaterialXFormat | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXFormat/ MESSAGE_NEVER | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/ MESSAGE_NEVER | ||
FILES_MATCHING PATTERN "*.h*") | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXFormat.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) |
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 |
---|---|---|
@@ -1,44 +1,52 @@ | ||
set(MATERIALX_MODULE_NAME MaterialXGenGlsl) | ||
|
||
file(GLOB_RECURSE materialx_source "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp") | ||
file(GLOB_RECURSE materialx_headers "${CMAKE_CURRENT_SOURCE_DIR}/*.h*") | ||
|
||
assign_source_group("Source Files" ${materialx_source}) | ||
assign_source_group("Header Files" ${materialx_headers}) | ||
|
||
add_library(MaterialXGenGlsl ${materialx_source} ${materialx_headers}) | ||
add_library(${MATERIALX_MODULE_NAME} ${materialx_source} ${materialx_headers}) | ||
|
||
add_definitions(-DMATERIALX_GENGLSL_EXPORTS) | ||
|
||
# Create version resource | ||
if(MATERIALX_BUILD_SHARED_LIBS AND MSVC) | ||
configure_file(${CMAKE_SOURCE_DIR}/cmake/modules/MaterialXVersion.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
target_sources(${MATERIALX_MODULE_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/version.rc) | ||
endif() | ||
|
||
set_target_properties( | ||
MaterialXGenGlsl PROPERTIES | ||
OUTPUT_NAME MaterialXGenGlsl${MATERIALX_LIBNAME_SUFFIX} | ||
${MATERIALX_MODULE_NAME} PROPERTIES | ||
OUTPUT_NAME ${MATERIALX_MODULE_NAME}${MATERIALX_LIBNAME_SUFFIX} | ||
COMPILE_FLAGS "${EXTERNAL_COMPILE_FLAGS}" | ||
LINK_FLAGS "${EXTERNAL_LINK_FLAGS}" | ||
INSTALL_RPATH "${MATERIALX_SAME_DIR_RPATH}" | ||
VERSION "${MATERIALX_LIBRARY_VERSION}" | ||
SOVERSION "${MATERIALX_MAJOR_VERSION}") | ||
|
||
target_link_libraries( | ||
MaterialXGenGlsl | ||
${MATERIALX_MODULE_NAME} | ||
MaterialXGenShader | ||
MaterialXCore | ||
${CMAKE_DL_LIBS}) | ||
|
||
target_include_directories(MaterialXGenGlsl | ||
target_include_directories(${MATERIALX_MODULE_NAME} | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../> | ||
$<INSTALL_INTERFACE:${MATERIALX_INSTALL_INCLUDE_PATH}> | ||
PRIVATE | ||
${EXTERNAL_INCLUDE_DIRS}) | ||
|
||
install(TARGETS MaterialXGenGlsl | ||
install(TARGETS ${MATERIALX_MODULE_NAME} | ||
EXPORT MaterialX | ||
ARCHIVE DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
LIBRARY DESTINATION ${MATERIALX_INSTALL_LIB_PATH} | ||
RUNTIME DESTINATION bin) | ||
|
||
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/" | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/MaterialXGenGlsl/ MESSAGE_NEVER | ||
DESTINATION ${MATERIALX_INSTALL_INCLUDE_PATH}/${MATERIALX_MODULE_NAME}/ MESSAGE_NEVER | ||
FILES_MATCHING PATTERN "*.h*") | ||
|
||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/MaterialXGenGlsl.pdb" | ||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE}/${MATERIALX_MODULE_NAME}.pdb" | ||
DESTINATION "${MATERIALX_INSTALL_LIB_PATH}/" OPTIONAL) |
Oops, something went wrong.