MaterialX 1.39.5
Loading...
Searching...
No Matches
ShaderGraphRefactor Class Referenceabstract

Base class for shader graph refactoring passes. More...

#include <ShaderGraphRefactor.h>

Inheritance diagram for ShaderGraphRefactor:
DistributeLayerOverMixRefactor NodeElisionRefactor PremultipliedBsdfAddRefactor

Public Member Functions

virtual const string & getName () const =0
 Return the name of this refactoring pass.
 
virtual size_t execute (ShaderGraph &graph, GenContext &context)=0
 Execute the pass on the given graph.
 

Detailed Description

Base class for shader graph refactoring passes.

Each pass identifies a structural pattern in the shader graph and rewrites it into a mathematically equivalent form better suited to the target backend.

Member Function Documentation

◆ execute()

virtual size_t execute ( ShaderGraph & graph,
GenContext & context )
pure virtual

Execute the pass on the given graph.

Return the number of graph edits made, or zero if the pass is not applicable to the current context.

Implemented in DistributeLayerOverMixRefactor, NodeElisionRefactor, and PremultipliedBsdfAddRefactor.

◆ getName()

virtual const string & getName ( ) const
pure virtual

Return the name of this refactoring pass.

Implemented in DistributeLayerOverMixRefactor, NodeElisionRefactor, and PremultipliedBsdfAddRefactor.


The documentation for this class was generated from the following file: