MaterialX 1.38.10
Loading...
Searching...
No Matches
SwizzleNode.h
1//
2// Copyright Contributors to the MaterialX Project
3// SPDX-License-Identifier: Apache-2.0
4//
5
6#ifndef MATERIALX_SWIZZLENODE_H
7#define MATERIALX_SWIZZLENODE_H
8
10
11MATERIALX_NAMESPACE_BEGIN
12
14class MX_GENSHADER_API SwizzleNode : public ShaderNodeImpl
15{
16 public:
17 static ShaderNodeImplPtr create();
18
19 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
20
24 bool isEditable(const ShaderInput& input) const override;
25
26 protected:
29 virtual string getVariableName(const ShaderInput* input) const;
30};
31
32MATERIALX_NAMESPACE_END
33
34#endif
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
Base class for shader node implementations.
A context class for shader generation.
Definition: GenContext.h:31
An input on a ShaderNode.
Definition: ShaderNode.h:264
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:326
Class handling the shader generation implementation for a node.
Definition: ShaderNodeImpl.h:31
virtual bool isEditable(const ShaderInput &) const
Returns true if an input is editable by users.
Definition: ShaderNodeImpl.h:91
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.
Definition: ShaderNodeImpl.cpp:57
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:139
Swizzle node implementation.
Definition: SwizzleNode.h:15