6#ifndef MATERIALX_CONVOLUTIONNODE_H
7#define MATERIALX_CONVOLUTIONNODE_H
13MATERIALX_NAMESPACE_BEGIN
15extern MX_GENSHADER_API
const std::array<float, 3> GAUSSIAN_KERNEL_3;
16extern MX_GENSHADER_API
const std::array<float, 5> GAUSSIAN_KERNEL_5;
17extern MX_GENSHADER_API
const std::array<float, 7> GAUSSIAN_KERNEL_7;
32 [[deprecated]]
bool acceptsInputType(
const TypeDesc* type)
const {
return acceptsInputType(*type); }
36 virtual void computeSampleOffsetStrings(
const string& sampleSizeName,
const string& offsetTypeString,
37 unsigned int filterWidth,
StringVec& offsetStrings)
const = 0;
46 unsigned int sampleCount,
unsigned int filterWidth,
47 float filterSize,
float filterOffset,
48 const string& sampleSizeFunctionUV,
53MATERIALX_NAMESPACE_END
vector< string > StringVec
A vector of strings.
Definition: Library.h:55
Base class for shader node implementations.
Utility class for implementations of nodes which perform convolutions.
Definition: ConvolutionNode.h:22
void emitInputSamplesUV(const ShaderNode &node, unsigned int sampleCount, unsigned int filterWidth, float filterSize, float filterOffset, const string &sampleSizeFunctionUV, GenContext &context, ShaderStage &stage, StringVec &sampleStrings) const
Generate upstream / input sampling code in uv space and cache the output variable names which will ho...
ConvolutionNode()
Constructor.
virtual const ShaderInput * getSamplingInput(const ShaderNode &node) const
Get input which is used for sampling.
virtual bool acceptsInputType(TypeDesc type) const =0
Derived classes are responsible for returning if a given type is an acceptable input.
void createVariables(const ShaderNode &node, GenContext &context, Shader &shader) const override
Create shader variables needed for the implementation of this node (e.g.
A context class for shader generation.
Definition: GenContext.h:31
Class containing all data needed during shader generation.
Definition: Shader.h:33
Class representing a node in the shader generation DAG.
Definition: ShaderNode.h:320
Class handling the shader generation implementation for a node.
Definition: ShaderNodeImpl.h:32
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