MaterialX 1.38.2
HeightToNormalNodeGlsl.h
1//
2// TM & (c) 2017 Lucasfilm Entertainment Company Ltd. and Lucasfilm Ltd.
3// All rights reserved. See LICENSE.txt for license.
4//
5
6#ifndef MATERIALX_HEIGHTTONORMALNODEGLSL_H
7#define MATERIALX_HEIGHTTONORMALNODEGLSL_H
8
9#include <MaterialXGenShader/Nodes/ConvolutionNode.h>
10
11namespace MaterialX
12{
13
16{
17 public:
18 static ShaderNodeImplPtr create();
19
20 void emitFunctionDefinition(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
21 void emitFunctionCall(const ShaderNode& node, GenContext& context, ShaderStage& stage) const override;
22
23 const string& getTarget() const override;
24
25 protected:
27 bool acceptsInputType(const TypeDesc* type) const override;
28
30 void computeSampleOffsetStrings(const string& sampleSizeName, const string& offsetTypeString,
31 unsigned int filterWidth, StringVec& offsetStrings) const override;
32};
33
34} // namespace MaterialX
35
36#endif
vector< string > StringVec
A vector of strings.
Definition: Library.h:56
shared_ptr< ShaderNodeImpl > ShaderNodeImplPtr
Shared pointer to a ShaderNodeImpl.
Definition: Library.h:40
Utility class for implementations of nodes which perform convolutions.
Definition: ConvolutionNode.h:23
A context class for shader generation.
Definition: GenContext.h:27
HeightToNormal node implementation for GLSL.
Definition: HeightToNormalNodeGlsl.h:16
const string & getTarget() const override
Return an identifier for the target used by this implementation.
Definition: HeightToNormalNodeGlsl.cpp:106
void computeSampleOffsetStrings(const string &sampleSizeName, const string &offsetTypeString, unsigned int filterWidth, StringVec &offsetStrings) const override
Compute offset strings for sampling.
Definition: HeightToNormalNodeGlsl.cpp:35
bool acceptsInputType(const TypeDesc *type) const override
Return if given type is an acceptible input.
Definition: HeightToNormalNodeGlsl.cpp:48
void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const override
Emit function definition for the given node instance.
Definition: HeightToNormalNodeGlsl.cpp:54
void emitFunctionCall(const ShaderNode &node, GenContext &context, ShaderStage &stage) const override
Emit the function call or inline source code for given node instance in the given context.
Definition: HeightToNormalNodeGlsl.cpp:64
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:326
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:124
A type descriptor for MaterialX data types.
Definition: TypeDesc.h:29