Fix #113058: Cycles: Bump mapping causing dark edges with subsurface
The refractive entry bounce does not like being below the shading normal, so use the existing clamping logic.
This commit is contained in:
parent
93aa1654be
commit
d071e0a5fc
|
@ -830,7 +830,7 @@ ccl_device void osl_closure_bssrdf_setup(KernelGlobals kg,
|
|||
|
||||
/* create one closure per color channel */
|
||||
bssrdf->albedo = closure->albedo;
|
||||
bssrdf->N = closure->N;
|
||||
bssrdf->N = maybe_ensure_valid_specular_reflection(sd, closure->N);
|
||||
bssrdf->alpha = sqr(closure->roughness);
|
||||
bssrdf->ior = closure->ior;
|
||||
bssrdf->anisotropy = closure->anisotropy;
|
||||
|
|
|
@ -381,7 +381,7 @@ ccl_device
|
|||
|
||||
bssrdf->radius = rgb_to_spectrum(subsurface_radius * subsurface_scale);
|
||||
bssrdf->albedo = rgb_to_spectrum(base_color);
|
||||
bssrdf->N = N;
|
||||
bssrdf->N = maybe_ensure_valid_specular_reflection(sd, N);
|
||||
bssrdf->alpha = sqr(roughness);
|
||||
bssrdf->ior = ior;
|
||||
bssrdf->anisotropy = stack_load_float(stack, data_subsurf.w);
|
||||
|
@ -834,7 +834,7 @@ ccl_device
|
|||
if (bssrdf) {
|
||||
bssrdf->radius = rgb_to_spectrum(stack_load_float3(stack, data_node.z) * param1);
|
||||
bssrdf->albedo = closure_weight;
|
||||
bssrdf->N = N;
|
||||
bssrdf->N = maybe_ensure_valid_specular_reflection(sd, N);
|
||||
bssrdf->ior = param2;
|
||||
bssrdf->alpha = 1.0f;
|
||||
bssrdf->anisotropy = stack_load_float(stack, data_node.w);
|
||||
|
|
Loading…
Reference in New Issue