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