Skip to content

Commit

Permalink
Removed unused colvolution node classification.
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasharrysson committed Jun 16, 2020
1 parent 06c21ea commit 8aefb5b
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 21 deletions.
8 changes: 0 additions & 8 deletions source/MaterialXGenOsl/OslShaderGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,14 +216,6 @@ ShaderPtr OslShaderGenerator::generate(const string& name, ElementPtr element, G
emitLine("#define GGX_DIRECTIONAL_ALBEDO_TABLE \"" + albedoTableFilePath + "\"", stage, false);
emitLineBreak(stage);

// Emit sampling code if needed
if (graph.hasClassification(ShaderNode::Classification::CONVOLUTION2D))
{
// Emit sampling functions
emitInclude("stdlib/" + OslShaderGenerator::LANGUAGE + "/lib/mx_sampling.osl", context, stage);
emitLineBreak(stage);
}

// Set the include file to use for uv transformations,
// depending on the vertical flip flag.
if (context.getOptions().fileTextureVerticalFlip)
Expand Down
6 changes: 0 additions & 6 deletions source/MaterialXGenShader/ShaderGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1021,12 +1021,6 @@ ShaderNode* ShaderGraph::createNode(const Node& node, GenContext& context)
_nodeMap[name] = newNode;
_nodeOrder.push_back(newNode.get());

// Check if the node is a convolution node and mark the graph as such.
if (newNode->hasClassification(Classification::CONVOLUTION2D))
{
_classification |= Classification::CONVOLUTION2D;
}

// Check if any of the node inputs should be connected to the graph interface
for (ValueElementPtr elem : node.getChildrenOfType<ValueElement>())
{
Expand Down
5 changes: 0 additions & 5 deletions source/MaterialXGenShader/ShaderNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ const string ShaderNode::TEXTURE2D_GROUPNAME = "texture2d";
const string ShaderNode::TEXTURE3D_GROUPNAME = "texture3d";
const string ShaderNode::PROCEDURAL2D_GROUPNAME = "procedural2d";
const string ShaderNode::PROCEDURAL3D_GROUPNAME = "procedural3d";
const string ShaderNode::CONVOLUTION2D_GROUPNAME = "convolution2d";

//
// ShaderNode methods
Expand Down Expand Up @@ -230,10 +229,6 @@ ShaderNodePtr ShaderNode::create(const ShaderGraph* parent, const string& name,
{
groupClassification = Classification::SAMPLE3D;
}
else if (groupName == CONVOLUTION2D_GROUPNAME)
{
groupClassification = Classification::CONVOLUTION2D;
}
}

// Create interface from nodedef
Expand Down
2 changes: 0 additions & 2 deletions source/MaterialXGenShader/ShaderNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ class ShaderNode
// Types based on nodegroup
static const uint32_t SAMPLE2D = 1 << 17; /// Can be sampled in 2D (uv space)
static const uint32_t SAMPLE3D = 1 << 18; /// Can be sampled in 3D (position)
static const uint32_t CONVOLUTION2D = 1 << 19; /// Performs a convolution in 2D (uv space)
};

/// @struct ScopeInfo
Expand Down Expand Up @@ -400,7 +399,6 @@ class ShaderNode
static const string TEXTURE3D_GROUPNAME;
static const string PROCEDURAL2D_GROUPNAME;
static const string PROCEDURAL3D_GROUPNAME;
static const string CONVOLUTION2D_GROUPNAME;

public:
/// Constructor.
Expand Down

0 comments on commit 8aefb5b

Please sign in to comment.