6#ifndef MATERIALX_BLURNODE_H
7#define MATERIALX_BLURNODE_H
9#include <MaterialXGenShader/Nodes/ConvolutionNode.h>
11MATERIALX_NAMESPACE_BEGIN
32 unsigned int filterWidth,
StringVec& offsetStrings)
const override;
36 const string& sampleName,
const StringVec& sampleStrings)
const;
38 const string& sampleName,
const StringVec& sampleStrings)
const
40 return outputSampleArray(shadergen, stage, *inputType, sampleName, sampleStrings);
43 static const string _sampleSizeFunctionUV;
44 static const float _filterSize;
45 static const float _filterOffset;
62 static const string FILTER_TYPE_STRING;
63 static const string FILTER_SIZE_STRING;
66MATERIALX_NAMESPACE_END
vector< string > StringVec
A vector of strings.
Definition: Library.h:55
Blur node implementation.
Definition: BlurNode.h:15
static const string IN_STRING
String constants.
Definition: BlurNode.h:61
virtual void emitSamplingFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const =0
Emit function definitions for sampling functions used by this node.
void computeSampleOffsetStrings(const string &sampleSizeName, const string &offsetTypeString, unsigned int filterWidth, StringVec &offsetStrings) const override
Compute offset strings for sampling.
static const string BOX_WEIGHTS_VARIABLE
Box filter weights variable name.
Definition: BlurNode.h:50
static const string FILTER_LIST
List of filters.
Definition: BlurNode.h:58
static const string BOX_FILTER
Box filter option on blur.
Definition: BlurNode.h:48
void emitFunctionDefinition(const ShaderNode &node, GenContext &context, ShaderStage &stage) const override
Emit function definition for the given node instance.
static const string GAUSSIAN_FILTER
Gaussian filter option on blur.
Definition: BlurNode.h:53
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.
virtual void outputSampleArray(const ShaderGenerator &shadergen, ShaderStage &stage, TypeDesc inputType, const string &sampleName, const StringVec &sampleStrings) const
Output sample array.
bool acceptsInputType(TypeDesc type) const override
Return if given type is an acceptible input.
static const string GAUSSIAN_WEIGHTS_VARIABLE
Gaussian filter weights variable name.
Definition: BlurNode.h:55
Utility class for implementations of nodes which perform convolutions.
Definition: ConvolutionNode.h:22
A context class for shader generation.
Definition: GenContext.h:31
Base class for shader generators All third-party shader generators should derive from this class.
Definition: ShaderGenerator.h:31
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:320
A shader stage, containing the state and resulting source code for the stage.
Definition: ShaderStage.h:139
A type descriptor for MaterialX data types.
Definition: TypeDesc.h:35