HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HeightToNormalNodeMdl.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_HEIGHTTONORMALNODEMDL_H
7 #define MATERIALX_HEIGHTTONORMALNODEMDL_H
8 
10 
12 
14 
15 /// HeightToNormal node implementation for MDL
17 {
18  public:
19  static ShaderNodeImplPtr create();
20 
21  void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
22 
23  const string& getTarget() const override;
24 
25  protected:
26  /// Return if given type is an acceptible input
27  bool acceptsInputType(const TypeDesc* type) const override;
28 
29  /// Compute offset strings for sampling
30  void computeSampleOffsetStrings(const string& sampleSizeName, const string& offsetTypeString,
31  unsigned int filterWidth, StringVec& offsetStrings) const override;
32 };
33 
35 
36 #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
#define MX_GENMDL_API
Definition: Export.h:18
virtual void computeSampleOffsetStrings(const string &sampleSizeName, const string &offsetTypeString, unsigned int filterWidth, StringVec &offsetStrings) const =0
virtual const string & getTarget() const
virtual bool acceptsInputType(const TypeDesc *type) const =0
Derived classes are responsible for returning if a given type is an acceptable input.
#define MATERIALX_NAMESPACE_END
Definition: Generated.h:26
HeightToNormal node implementation for MDL.
type
Definition: core.h:1059
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...