Cycles: Remove unused Normal input on Hair BSDF

This was causing a warning when using OSL, since the OSL implementation
didn't implement the input.
Since the socket isn't really implemented on the Blender side anyways,
just get rid of it.

Also, the SVM code uses the shading normal while OSL used the geometric normal.
This commit is contained in:
Lukas Stockner 2023-09-16 03:16:13 +02:00
parent c963e22a0c
commit 5939810b3c
2 changed files with 2 additions and 3 deletions

View File

@ -36,8 +36,8 @@ shader node_hair_bsdf(color Color = 0.8,
}
else {
if (component == "reflection")
BSDF = Color * hair_reflection(Ng, roughnessh, roughnessv, T, offset);
BSDF = Color * hair_reflection(N, roughnessh, roughnessv, T, offset);
else
BSDF = Color * hair_transmission(Ng, roughnessh, roughnessv, T, offset);
BSDF = Color * hair_transmission(N, roughnessh, roughnessv, T, offset);
}
}

View File

@ -3525,7 +3525,6 @@ NODE_DEFINE(HairBsdfNode)
NodeType *type = NodeType::add("hair_bsdf", create, NodeType::SHADER);
SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
SOCKET_IN_NORMAL(normal, "Normal", zero_float3(), SocketType::LINK_NORMAL);
SOCKET_IN_FLOAT(surface_mix_weight, "SurfaceMixWeight", 0.0f, SocketType::SVM_INTERNAL);
static NodeEnum component_enum;