Remove node input "Blur"
This commit is contained in:
parent
0da0f29c17
commit
5c9581920e
|
@ -34,9 +34,6 @@ typedef struct MicrofacetHairBSDF {
|
|||
/* IOR. */
|
||||
float eta;
|
||||
|
||||
/* Blur. */
|
||||
float blur;
|
||||
|
||||
/* GGX/Beckmann. */
|
||||
int distribution_type;
|
||||
|
||||
|
@ -1382,9 +1379,7 @@ ccl_device void bsdf_microfacet_hair_blur(ccl_private ShaderClosure *sc, float r
|
|||
{
|
||||
ccl_private MicrofacetHairBSDF *bsdf = (ccl_private MicrofacetHairBSDF *)sc;
|
||||
|
||||
if (bsdf->blur > 0) {
|
||||
bsdf->roughness = fmaxf(roughness, bsdf->roughness);
|
||||
}
|
||||
bsdf->roughness = fmaxf(roughness, bsdf->roughness);
|
||||
}
|
||||
|
||||
/* Hair Albedo */
|
||||
|
|
|
@ -892,12 +892,9 @@ ccl_device_noinline int svm_node_closure_bsdf(KernelGlobals kg,
|
|||
float alpha = stack_load_float_default(stack, offset_ofs, data_node.z);
|
||||
float ior = stack_load_float_default(stack, ior_ofs, data_node.w);
|
||||
|
||||
uint Blur_ofs, melanin_ofs, melanin_redness_ofs, absorption_coefficient_ofs;
|
||||
svm_unpack_node_uchar4(data_node2.x,
|
||||
&Blur_ofs,
|
||||
&melanin_ofs,
|
||||
&melanin_redness_ofs,
|
||||
&absorption_coefficient_ofs);
|
||||
uint melanin_ofs, melanin_redness_ofs, absorption_coefficient_ofs, temp;
|
||||
svm_unpack_node_uchar4(
|
||||
data_node2.x, &temp, &melanin_ofs, &melanin_redness_ofs, &absorption_coefficient_ofs);
|
||||
|
||||
uint tint_ofs, random_ofs, random_color_ofs, cross_section_type;
|
||||
svm_unpack_node_uchar4(
|
||||
|
@ -917,7 +914,6 @@ ccl_device_noinline int svm_node_closure_bsdf(KernelGlobals kg,
|
|||
float R = stack_load_float_default(stack, R_ofs, data_node4.y);
|
||||
float TT = stack_load_float_default(stack, TT_ofs, data_node4.z);
|
||||
float TRT = stack_load_float_default(stack, TRT_ofs, data_node4.w);
|
||||
float blur = stack_load_float_default(stack, Blur_ofs, data_node2.y);
|
||||
|
||||
ccl_private MicrofacetHairBSDF *bsdf = (ccl_private MicrofacetHairBSDF *)bsdf_alloc(
|
||||
sd, sizeof(MicrofacetHairBSDF), weight);
|
||||
|
@ -932,7 +928,6 @@ ccl_device_noinline int svm_node_closure_bsdf(KernelGlobals kg,
|
|||
bsdf->extra->R = fmaxf(0.0f, R);
|
||||
bsdf->extra->TT = fmaxf(0.0f, TT);
|
||||
bsdf->extra->TRT = fmaxf(0.0f, TRT);
|
||||
bsdf->blur = clamp(blur, 0.0f, 1.0f);
|
||||
|
||||
/* Random factors range: [-randomization/2, +randomization/2]. */
|
||||
float random_roughness = param2;
|
||||
|
|
|
@ -3680,8 +3680,6 @@ NODE_DEFINE(MicrofacetHairBsdfNode)
|
|||
SOCKET_IN_FLOAT(TT, "Transmission", 1.0f);
|
||||
SOCKET_IN_FLOAT(TRT, "Secondary Reflection", 1.0f);
|
||||
|
||||
SOCKET_IN_FLOAT(Blur, "Blur", 1.0f);
|
||||
|
||||
SOCKET_IN_FLOAT(random_roughness, "Random Roughness", 0.0f);
|
||||
SOCKET_IN_FLOAT(random_color, "Random Color", 0.0f);
|
||||
SOCKET_IN_FLOAT(random, "Random", 0.0f);
|
||||
|
@ -3730,7 +3728,6 @@ void MicrofacetHairBsdfNode::compile(SVMCompiler &compiler)
|
|||
ShaderInput *R_in = input("Reflection");
|
||||
ShaderInput *TT_in = input("Transmission");
|
||||
ShaderInput *TRT_in = input("Secondary Reflection");
|
||||
ShaderInput *Blur_in = input("Blur");
|
||||
|
||||
ShaderInput *aspect_ratio_in = input("Aspect Ratio");
|
||||
|
||||
|
@ -3772,13 +3769,11 @@ void MicrofacetHairBsdfNode::compile(SVMCompiler &compiler)
|
|||
__float_as_uint(ior));
|
||||
|
||||
/* data node 2 */
|
||||
compiler.add_node(compiler.encode_uchar4(compiler.stack_assign_if_linked(Blur_in),
|
||||
melanin_ofs,
|
||||
melanin_redness_ofs,
|
||||
absorption_coefficient_ofs),
|
||||
__float_as_uint(Blur),
|
||||
__float_as_uint(melanin),
|
||||
__float_as_uint(melanin_redness));
|
||||
compiler.add_node(
|
||||
compiler.encode_uchar4(0, melanin_ofs, melanin_redness_ofs, absorption_coefficient_ofs),
|
||||
0,
|
||||
__float_as_uint(melanin),
|
||||
__float_as_uint(melanin_redness));
|
||||
|
||||
/* data node 3 */
|
||||
compiler.add_node(
|
||||
|
|
|
@ -914,8 +914,6 @@ class MicrofacetHairBsdfNode : public BsdfBaseNode {
|
|||
NODE_SOCKET_API(float, TT)
|
||||
NODE_SOCKET_API(float, TRT)
|
||||
|
||||
NODE_SOCKET_API(float, Blur)
|
||||
|
||||
NODE_SOCKET_API(float3, normal)
|
||||
NODE_SOCKET_API(float, surface_mix_weight)
|
||||
/* If linked, here will be the given random number. */
|
||||
|
|
|
@ -57,7 +57,6 @@ void node_bsdf_hair_microfacet(vec4 color,
|
|||
float ior,
|
||||
float offset,
|
||||
float aspect_ratio,
|
||||
float Blur,
|
||||
float random_color,
|
||||
float random_roughness,
|
||||
float random,
|
||||
|
|
|
@ -87,11 +87,6 @@ static void node_declare(NodeDeclarationBuilder &b)
|
|||
.description(
|
||||
"The tilt angle of the cuticle scales (the outermost part of the hair). They are always "
|
||||
"tilted towards the hair root. The value is usually between 2 and 4 for human hair");
|
||||
b.add_input<decl::Float>(N_("Blur"))
|
||||
.default_value(1.0f)
|
||||
.min(0.0f)
|
||||
.max(1.0f)
|
||||
.subtype(PROP_FACTOR);
|
||||
b.add_input<decl::Float>(N_("Random Color"))
|
||||
.default_value(0.0f)
|
||||
.min(0.0f)
|
||||
|
|
Loading…
Reference in New Issue