Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ This folder contains the standard data libraries for MaterialX, providing declar
- point, directional, spot
- Shader generation does not currently support:
- `displacementshader` and `volumeshader` nodes for hardware shading targets (GLSL, MSL).
- `hextiledimage` and `hextilednormalmap` for MSL, OSL, and MDL.
- `hextiledimage` and `hextilednormalmap` for OSL and MDL.
5 changes: 2 additions & 3 deletions source/MaterialXTest/MaterialXGenMsl/GenMsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ TEST_CASE("GenShader: MSL Implementation Check", "[genmsl]")

mx::StringSet generatorSkipNodeTypes;
mx::StringSet generatorSkipNodeDefs;
generatorSkipNodeDefs.insert("ND_hextiledimage_color3");
generatorSkipNodeDefs.insert("ND_hextiledimage_color4");
generatorSkipNodeDefs.insert("ND_hextilednormalmap_vector3");
// To skip specific node definitions for this code generation target, add them as below:
// generatorSkipNodeDefs.insert("ND_example_color3");
GenShaderUtil::checkImplementations(context, generatorSkipNodeTypes, generatorSkipNodeDefs);
}

Expand Down
4 changes: 2 additions & 2 deletions source/MaterialXTest/MaterialXGenMsl/GenMsl.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ class MslShaderGeneratorTester : public GenShaderUtil::ShaderGeneratorTester

void addSkipFiles() override
{
_skipFiles.insert("standard_surface_onyx_hextiled.mtlx");
_skipFiles.insert("hextiled.mtlx");
// To skip specific files for this render target, add them as below:
// _skipFiles.insert("example.mtlx");
}

void setupDependentLibraries() override
Expand Down
8 changes: 8 additions & 0 deletions source/MaterialXTest/MaterialXRender/RenderUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ bool ShaderRenderTester::validate(const mx::FilePath optionsFilePath)

createRenderer(log);

addSkipFiles();

mx::ColorManagementSystemPtr colorManagementSystem;
#ifdef MATERIALX_BUILD_OCIO
try
Expand Down Expand Up @@ -223,6 +225,12 @@ bool ShaderRenderTester::validate(const mx::FilePath optionsFilePath)
continue;
}

if (_skipFiles.count(file) > 0)
{
ioTimer.endTimer();
continue;
}

const mx::FilePath filename = mx::FilePath(dir) / mx::FilePath(file);
mx::DocumentPtr doc = mx::createDocument();
try
Expand Down
6 changes: 6 additions & 0 deletions source/MaterialXTest/MaterialXRender/RenderUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ class ShaderRenderTester
// If these streams don't exist add them for testing purposes
void addAdditionalTestStreams(mx::MeshPtr mesh);

// Add any paths to explicitly skip here
virtual void addSkipFiles() {}

// Generator to use
mx::ShaderGeneratorPtr _shaderGenerator;
// Whether to resolve image file name references before code generation
Expand All @@ -172,6 +175,9 @@ class ShaderRenderTester
// Color management information
mx::ColorManagementSystemPtr _colorManagementSystem;
mx::FilePath _colorManagementConfigFile;

// Filter controls for tests.
mx::StringSet _skipFiles;
};

} // namespace RenderUtil
Expand Down
6 changes: 6 additions & 0 deletions source/MaterialXTest/MaterialXRenderOsl/RenderOsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,12 @@ class OslShaderRenderTester : public RenderUtil::ShaderRenderTester
const std::string& outputPath = ".",
mx::ImageVec* imageVec = nullptr) override;

void addSkipFiles() override
{
_skipFiles.insert("standard_surface_onyx_hextiled.mtlx");
_skipFiles.insert("hextiled.mtlx");
}

bool saveImage(const mx::FilePath& filePath, mx::ConstImagePtr image, bool /*verticalFlip*/) const override
{
return _renderer->getImageHandler()->saveImage(filePath, image, false);
Expand Down
Loading