|
HDK
|
#include <ShaderNodeImpl.h>
Inheritance diagram for ShaderNodeImpl:Public Member Functions | |
| virtual | ~ShaderNodeImpl () |
| virtual void | initialize (const InterfaceElement &element, GenContext &context) |
| const string & | getName () const |
| Return the name of this implementation. More... | |
| size_t | getHash () const |
| virtual void | addInputs (ShaderNode &node, GenContext &context) const |
| Add additional inputs on a node. More... | |
| virtual void | setValues (const Node &node, ShaderNode &shaderNode, GenContext &context) const |
| Set values for additional inputs on a node. More... | |
| virtual void | addClassification (ShaderNode &node) const |
| Add additional classifications on a node. More... | |
| virtual void | createVariables (const ShaderNode &node, GenContext &context, Shader &shader) const |
| virtual void | emitFunctionDefinition (const ShaderNode &node, GenContext &context, ShaderStage &stage) const |
| Emit function definition for the given node instance. More... | |
| 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. More... | |
| virtual void | emitOutputVariables (const ShaderNode &node, GenContext &context, ShaderStage &stage) const |
| Emit declaration and initialization of output variables to use in a function call. More... | |
| virtual ShaderGraph * | getGraph () const |
| virtual bool | isEditable (const ShaderInput &) const |
| virtual bool | isEditable (const ShaderGraphInputSocket &) const |
Protected Member Functions | |
| ShaderNodeImpl () | |
| Protected constructor. More... | |
| bool | nodeOutputIsClosure (const ShaderNode &node) const |
Protected Attributes | |
| string | _name |
| size_t | _hash |
Class handling the shader generation implementation for a node. Responsible for emitting the function definition and function call that is the node implementation.
Definition at line 31 of file ShaderNodeImpl.h.
|
inlinevirtual |
Definition at line 34 of file ShaderNodeImpl.h.
|
protected |
Protected constructor.
|
virtual |
Add additional classifications on a node.
Reimplemented in CompoundNode, HwMaterialCompoundNode, MaterialNode, and ClosureCompoundNodeMdl.
|
virtual |
Add additional inputs on a node.
Reimplemented in LayerableNodeMdl, ImageNodeMdl, and HwImageNode.
|
virtual |
Create shader variables needed for the implementation of this node (e.g. uniforms, inputs and outputs). Used if the node requires input data from the application.
Reimplemented in HwGeomPropValueNodeAsUniform, HwLightShaderNode, CompoundNode, HwLightCompoundNode, HwLightNode, HwNumLightsNode, HwSurfaceNode, HwTexCoordNode, HwTransformNode, ConvolutionNode, HwBitangentNode, HwFrameNode, HwGeomColorNode, HwGeomPropValueNode, HwNormalNode, HwPositionNode, HwTangentNode, HwTimeNode, and HwViewDirectionNode.
|
virtual |
Emit the function call or inline source code for given node instance in the given context.
Reimplemented in ClosureLayerNodeMdl, CompoundNodeMdl, HwGeomPropValueNodeAsUniform, CompoundNode, HwLightCompoundNode, HwLightShaderNode, ImageNodeMdl, SourceCodeNode, SourceCodeNodeMdl, HwLightNode, HwSurfaceNode, HwTexCoordNode, ClosureCompoundNodeMdl, MaterialNode, HwBitangentNode, HwFrameNode, HwGeomColorNode, HwGeomPropValueNode, HwNormalNode, HwPositionNode, HwTangentNode, HwTimeNode, HwTransformNode, HwViewDirectionNode, HeightToNormalNodeMdl, MaterialNodeMdl, and SurfaceNodeMdl.
|
virtual |
Emit function definition for the given node instance.
Reimplemented in CompoundNodeMdl, CompoundNode, HwLightCompoundNode, SourceCodeNode, SourceCodeNodeMdl, HwNumLightsNode, CustomCodeNodeMdl, HwLightSamplerNode, and ClosureCompoundNodeMdl.
|
virtual |
Emit declaration and initialization of output variables to use in a function call.
|
virtual |
Return a pointer to the graph if this implementation is using a graph, or returns nullptr otherwise.
Reimplemented in CompoundNode.
|
inline |
Return a hash for this implementation. The hash should correspond to the function signature generated for the node, and can be used to compare implementations, e.g. to query if an identical function has already been emitted during shader generation.
Definition at line 51 of file ShaderNodeImpl.h.
|
inline |
Return the name of this implementation.
Definition at line 42 of file ShaderNodeImpl.h.
|
virtual |
Initialize with the given implementation element. Initialization must set the name and hash for the implementation, as well as any other data needed to emit code for the node.
Reimplemented in CompoundNodeMdl, HwLightShaderNode, SourceCodeNode, HwLightCompoundNode, SourceCodeNodeMdl, CompoundNode, CustomCodeNodeMdl, HwMaterialCompoundNode, and OsoNode.
|
inlinevirtual |
Returns true if an input is editable by users. Editable inputs are allowed to be published as shader uniforms and hence must be presentable in a user interface. By default all inputs are considered to be editable.
Reimplemented in LayerableNodeMdl, ImageNodeMdl, HwImplementation, and HwGeomPropValueNode.
Definition at line 86 of file ShaderNodeImpl.h.
|
inlinevirtual |
Returns true if a graph input is accessible by users. Accessible inputs are allowed to be published as shader uniforms and hence must be presentable in a user interface. By default all graph inputs are considered to be accessible.
Definition at line 95 of file ShaderNodeImpl.h.
|
protected |
Returns true if the first output of the node is a closure This is used by SourceCodeNode and CompoundNode to generate the appropriate shader code.
|
virtual |
Set values for additional inputs on a node.
Reimplemented in HwImageNode.
|
protected |
Definition at line 111 of file ShaderNodeImpl.h.
|
protected |
Definition at line 110 of file ShaderNodeImpl.h.