HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HeightToNormalNodeMsl.h
Go to the documentation of this file.
1 //
2 // Copyright Contributors to the MaterialX Project
3 // SPDX-License-Identifier: Apache-2.0
4 //
5 
6 #ifndef MATERIALX_HEIGHTTONORMALNODEMSL_H
7 #define MATERIALX_HEIGHTTONORMALNODEMSL_H
8 
10 
12 
14 
15 /// HeightToNormal node implementation for MSL
17 {
18  public:
19  static ShaderNodeImplPtr create();
20 
21  void createVariables(const ShaderNode&, GenContext&, Shader& shader) const override;
22 
23  void emitFunctionDefinition(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
24  void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
25 
26  const string& getTarget() const override;
27 
28  protected:
29  /// Return if given type is an acceptible input
30  bool acceptsInputType(const TypeDesc* type) const override;
31 
32  /// Compute offset strings for sampling
33  void computeSampleOffsetStrings(const string& sampleSizeName, const string& offsetTypeString,
34  unsigned int filterWidth, StringVec& offsetStrings) const override;
35 };
36 
38 
39 #endif
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
#define MATERIALX_NAMESPACE_BEGIN
Definition: Generated.h:25
vector< string > StringVec
A vector of strings.
Definition: Library.h:57
virtual void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const
Emit function definition for the given node instance.
virtual void computeSampleOffsetStrings(const string &sampleSizeName, const string &offsetTypeString, unsigned int filterWidth, StringVec &offsetStrings) const =0
virtual const string & getTarget() const
HeightToNormal node implementation for MSL.
virtual bool acceptsInputType(const TypeDesc *type) const =0
Derived classes are responsible for returning if a given type is an acceptable input.
#define MX_GENMSL_API
Definition: Export.h:18
GLuint shader
Definition: glcorearb.h:785
Definition: Shader.h:32
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26
type
Definition: core.h:1059
void createVariables(const ShaderNode &node, GenContext &context, Shader &shader) const override
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...