[Bf-blender-cvs] [c7b3abd470d] soc-2018-hair-shader: Fix: rename PrincipledHairBsdfNode's melanin stuff
L. E. Segovia
noreply at git.blender.org
Mon Jul 9 03:44:19 CEST 2018
Commit: c7b3abd470d241cd90d22656069a2b8e69c15b66
Author: L. E. Segovia
Date: Mon Jul 9 00:54:53 2018 +0000
Branches: soc-2018-hair-shader
https://developer.blender.org/rBc7b3abd470d241cd90d22656069a2b8e69c15b66
Fix: rename PrincipledHairBsdfNode's melanin stuff
===================================================================
M intern/cycles/render/nodes.cpp
M intern/cycles/render/nodes.h
===================================================================
diff --git a/intern/cycles/render/nodes.cpp b/intern/cycles/render/nodes.cpp
index b7b0bd636f2..f1137ed6e53 100644
--- a/intern/cycles/render/nodes.cpp
+++ b/intern/cycles/render/nodes.cpp
@@ -3069,8 +3069,8 @@ NODE_DEFINE(PrincipledHairBsdfNode)
// Initialize all sockets to their default values.
SOCKET_IN_COLOR(color, "Color", make_float3(0.8f, 0.8f, 0.8f));
- SOCKET_IN_FLOAT(melanin_concentration, "Melanin", 1.3f);
- SOCKET_IN_FLOAT(melanin_redness_ratio, "Melanin Redness", 1.0f);
+ SOCKET_IN_FLOAT(melanin, "Melanin", 1.3f);
+ SOCKET_IN_FLOAT(melanin_redness, "Melanin Redness", 1.0f);
SOCKET_IN_COLOR(tint, "Tint", make_float3(1.f, 1.f, 1.f));
SOCKET_IN_FLOAT(color_randomization, "Color Randomization", 0.0f);
SOCKET_IN_VECTOR(absorption_coefficient, "Absorption Coefficient", make_float3(0.245531f, 0.52f, 1.365f), SocketType::VECTOR);
@@ -3125,8 +3125,8 @@ void PrincipledHairBsdfNode::compile(SVMCompiler& compiler)
ShaderInput *offset_in = input("Offset");
ShaderInput *primary_reflection_roughness_in = input("Undercoat Roughness");
ShaderInput *ior_in = input("IOR");
- ShaderInput *melanin_concentration_in = input("Melanin");
- ShaderInput *melanin_redness_ratio_in = input("Melanin Redness");
+ ShaderInput *melanin_in = input("Melanin");
+ ShaderInput *melanin_redness_in = input("Melanin Redness");
ShaderInput *color_randomization_in = input("Color Randomization");
int color_ofs = compiler.stack_assign(input("Color"));
@@ -3159,12 +3159,12 @@ void PrincipledHairBsdfNode::compile(SVMCompiler& compiler)
compiler.add_node(
compiler.encode_uchar4(
compiler.stack_assign_if_linked(primary_reflection_roughness_in),
- compiler.stack_assign_if_linked(melanin_concentration_in),
- compiler.stack_assign_if_linked(melanin_redness_ratio_in),
+ compiler.stack_assign_if_linked(melanin_in),
+ compiler.stack_assign_if_linked(melanin_redness_in),
absorption_coefficient_ofs),
__float_as_uint(primary_reflection_roughness),
- __float_as_uint(melanin_concentration),
- __float_as_uint(melanin_redness_ratio));
+ __float_as_uint(melanin),
+ __float_as_uint(melanin_redness));
compiler.add_node(
compiler.encode_uchar4(
diff --git a/intern/cycles/render/nodes.h b/intern/cycles/render/nodes.h
index 0fef5dbcfaf..ad823294f36 100644
--- a/intern/cycles/render/nodes.h
+++ b/intern/cycles/render/nodes.h
@@ -627,9 +627,9 @@ public:
/* Direct coloring's color. */
float3 color;
/* Melanin concentration. */
- float melanin_concentration;
+ float melanin;
/* Melanin redness ratio. */
- float melanin_redness_ratio;
+ float melanin_redness;
/* Dye color. */
float3 tint;
/* Randomization factor for melanin quantities. */
More information about the Bf-blender-cvs
mailing list