Fix T62145: Geometry.Backface Node Renders Black

The NODE_GROUP_LEVEL of the Geometry node should be bumped to 1
when Backface is connected. Backface uses `NODE_LIGHT_PATH` that
is part of NODE_GROUP_LEVEL1, the rest of the geometry ndoe is
NODE_GROUP_LEVEL_0.
This commit is contained in:
2019-03-14 09:20:11 +01:00
parent 6eeac735f2
commit 4887baf7d6
2 changed files with 15 additions and 0 deletions

View File

@@ -3384,6 +3384,20 @@ void GeometryNode::compile(OSLCompiler& compiler)
compiler.add(this, "node_geometry");
}
int GeometryNode::get_group()
{
ShaderOutput *out;
int result = ShaderNode::get_group();
/* Backfacing uses NODE_LIGHT_PATH */
out = output("Backfacing");
if (!out->links.empty()) {
result = max(result, NODE_GROUP_LEVEL_1);
}
return result;
}
/* TextureCoordinate */
NODE_DEFINE(TextureCoordinateNode)