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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user