6#ifndef MATERIALX_SHADERGEN_UTIL_H
7#define MATERIALX_SHADERGEN_UTIL_H
16#include <unordered_set>
35MX_GENSHADER_API
bool isTransparentSurface(ElementPtr element,
const string& target = EMPTY_STRING);
41MX_GENSHADER_API
void mapValueToColor(ConstValuePtr value, Color4& color);
44MX_GENSHADER_API
bool requiresImplementation(ConstNodeDefPtr nodeDef);
47MX_GENSHADER_API
bool elementRequiresShading(ConstTypedElementPtr element);
54MX_GENSHADER_API
void findRenderableMaterialNodes(ConstDocumentPtr doc,
55 vector<TypedElementPtr>& elements,
56 bool includeReferencedGraphs,
57 std::unordered_set<ElementPtr>& processedSources);
63MX_GENSHADER_API
void findRenderableElements(ConstDocumentPtr doc, vector<TypedElementPtr>& elements,
64 bool includeReferencedGraphs =
false);
68MX_GENSHADER_API
InputPtr getNodeDefInput(InputPtr nodeInput,
const string& target);
74MX_GENSHADER_API
void tokenSubstitution(
const StringMap& substitutions,
string& source);
78MX_GENSHADER_API vector<Vector2> getUdimCoordinates(
const StringVec& udimIdentifiers);
82MX_GENSHADER_API
void getUdimScaleAndOffset(
const vector<Vector2>& udimCoordinates, Vector2& scaleUV, Vector2& offsetUV);
88MX_GENSHADER_API
NodePtr connectsToWorldSpaceNode(OutputPtr output);
94MX_GENSHADER_API
bool hasElementAttributes(OutputPtr output,
const StringVec& attributes);
The top-level Document class.
shared_ptr< Input > InputPtr
A shared pointer to an Input.
Definition: Interface.h:32
Macros for declaring imported and exported symbols.
shared_ptr< Node > NodePtr
A shared pointer to a Node.
Definition: Node.h:25