6#ifndef MATERIALX_SHADERNODEIMPL_H
7#define MATERIALX_SHADERNODEIMPL_H
18MATERIALX_NAMESPACE_BEGIN
40 virtual const string&
getTarget()
const {
return EMPTY_STRING; }
122MATERIALX_NAMESPACE_END
Macros for declaring imported and exported symbols.
Library-wide includes and types.
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
shared_ptr< class ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: ShaderNodeImpl.h:25
Type descriptor for a MaterialX data type.
A context class for shader generation.
Definition: GenContext.h:31
The base class for interface elements such as Node, NodeDef, and NodeGraph.
Definition: Interface.h:312
A node element within a NodeGraph or Document.
Definition: Node.h:53
A no operation node, to be used for organizational nodes that has no code to execute.
Definition: ShaderNodeImpl.h:117
Class representing a graph (DAG) for shader generation.
Definition: ShaderGraph.h:44
Class containing all data needed during shader generation.
Definition: Shader.h:33
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:320
Class handling the shader generation implementation for a node.
Definition: ShaderNodeImpl.h:32
virtual void initialize(const InterfaceElement &element, GenContext &context)
Initialize with the given implementation element.
virtual bool isEditable(const ShaderInput &) const
Returns true if an input is editable by users.
Definition: ShaderNodeImpl.h:92
virtual void addInputs(ShaderNode &node, GenContext &context) const
Add additional inputs on a node.
virtual void createVariables(const ShaderNode &node, GenContext &context, Shader &shader) const
Create shader variables needed for the implementation of this node (e.g.
virtual bool isEditable(const ShaderGraphInputSocket &) const
Returns true if a graph input is accessible by users.
Definition: ShaderNodeImpl.h:101
const string & getName() const
Return the name of this implementation.
Definition: ShaderNodeImpl.h:48
virtual void emitOutputVariables(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit declaration and initialization of output variables to use in a function call.
virtual void setValues(const Node &node, ShaderNode &shaderNode, GenContext &context) const
Set values for additional inputs on a node.
virtual const string & getTarget() const
Return an identifier for the target used by this implementation.
Definition: ShaderNodeImpl.h:40
ShaderNodeImpl()
Protected constructor.
size_t getHash() const
Return a hash for this implementation.
Definition: ShaderNodeImpl.h:57
virtual void addClassification(ShaderNode &node) const
Add additional classifications on a node.
virtual void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit function definition for the given node instance.
virtual void emitFunctionCall(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit the function call or inline source code for given node instance in the given context.
virtual ShaderGraph * getGraph() const
Return a pointer to the graph if this implementation is using a graph, or returns nullptr otherwise.
An output on a ShaderNode.
Definition: ShaderNode.h:295
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:139