Cycles: rename UV geometry node output to Parametric to avoid confusion with uv texture coordinates.

This commit is contained in:
Brecht Van Lommel
2011-05-04 15:22:15 +00:00
parent cf00171da5
commit 6778ea39d5
3 changed files with 7 additions and 7 deletions

View File

@@ -27,7 +27,7 @@ shader node_geometry(
output normal Tangent = normal(0.0, 0.0, 0.0),
output normal TrueNormal = normal(0.0, 0.0, 0.0),
output vector Incoming = vector(0.0, 0.0, 0.0),
output point UV = point(0.0, 0.0, 0.0),
output point Parametric = point(0.0, 0.0, 0.0),
output float Backfacing = 0.0)
{
Position = P;
@@ -35,16 +35,16 @@ shader node_geometry(
Tangent = normalize(dPdu);
TrueNormal = Ng;
Incoming = I;
UV = point(u, v, 0.0);
Parametric = point(u, v, 0.0);
Backfacing = backfacing();
if(bump_offset == "dx") {
Position += Dx(Position);
UV += Dx(UV);
Parametric += Dx(Parametric);
}
else if(bump_offset == "dy") {
Position += Dy(Position);
UV += Dy(UV);
Parametric += Dy(Parametric);
}
}

View File

@@ -1251,7 +1251,7 @@ GeometryNode::GeometryNode()
add_output("Tangent", SHADER_SOCKET_NORMAL);
add_output("True Normal", SHADER_SOCKET_NORMAL);
add_output("Incoming", SHADER_SOCKET_VECTOR);
add_output("UV", SHADER_SOCKET_POINT);
add_output("Parametric", SHADER_SOCKET_POINT);
add_output("Backfacing", SHADER_SOCKET_FLOAT);
}
@@ -1295,7 +1295,7 @@ void GeometryNode::compile(SVMCompiler& compiler)
compiler.add_node(geom_node, NODE_GEOM_I, out->stack_offset);
}
out = output("UV");
out = output("Parametric");
if(!out->links.empty()) {
compiler.stack_assign(out);
compiler.add_node(geom_node, NODE_GEOM_uv, out->stack_offset);

View File

@@ -37,7 +37,7 @@ static bNodeSocketType sh_node_geometry_out[]= {
{ SOCK_VECTOR, 1, "Tangent", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, "True Normal", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, "Incoming", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, "UV", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VECTOR, 1, "Parametric", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ SOCK_VALUE, 1, "Backfacing", 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f},
{ -1, 0, "" }
};