Skip to content

Commit

Permalink
Merge pull request #3171 from Autodesk/gamaj/MAYA-129798/use_ocio_for…
Browse files Browse the repository at this point in the history
…_mtlx_shading

MAYA-129798 - Use experimental OCIO hooks for MaterialX shading
  • Loading branch information
seando-adsk committed Jun 20, 2023
2 parents 1e96853 + 10ef4ae commit f410453
Show file tree
Hide file tree
Showing 26 changed files with 4,228 additions and 53 deletions.
2 changes: 2 additions & 0 deletions lib/mayaUsd/render/MaterialXGenOgsXml/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
target_sources(${PROJECT_NAME}
PRIVATE
GlslFragmentGenerator.cpp
GlslOcioNodeImpl.cpp
OgsFragment.cpp
OgsXmlGenerator.cpp
Nodes/SurfaceNodeMaya.cpp
Expand All @@ -12,6 +13,7 @@ target_sources(${PROJECT_NAME}

set(HEADERS
GlslFragmentGenerator.h
GlslOcioNodeImpl.h
OgsFragment.h
OgsXmlGenerator.h
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "Nodes/SurfaceNodeMaya.h"

#include <mayaUsd/render/MaterialXGenOgsXml/GlslOcioNodeImpl.h>
#include <mayaUsd/render/MaterialXGenOgsXml/OgsXmlGenerator.h>

#include <MaterialXGenGlsl/GlslShaderGenerator.h>
Expand Down Expand Up @@ -146,6 +147,10 @@ GlslFragmentGenerator::GlslFragmentGenerator()
= "g_lightData"; // Store Maya lights in global non-const
_tokenSubstitutions[HW::T_NUM_ACTIVE_LIGHT_SOURCES] = "g_numActiveLightSources";
}

for (auto&& implName : GlslOcioNodeImpl::getOCIOImplementations()) {
registerImplementation(implName, GlslOcioNodeImpl::create);
}
}

ShaderGeneratorPtr GlslFragmentGenerator::create()
Expand Down
Loading

0 comments on commit f410453

Please sign in to comment.