Cycles: new Microfacet-based Hair BSDF with elliptical cross-section support #105600

Merged
Weizhen Huang merged 114 commits from weizhen/blender:microfacet_hair into main 2023-08-18 12:46:20 +02:00
Showing only changes of commit 7d14b8da7e - Show all commits

View File

@ -229,9 +229,11 @@ ccl_device int bsdf_microfacet_hair_setup(ccl_private ShaderData *sd,
/* Treat as transparent material if intersection lies outside of the projected radius. */
if (fabsf(bsdf->h) >= bsdf->extra->radius) {
/* Remove allocated closures. */
sd->num_closure--;
sd->num_closure_left += 2;
/* Allocate transparent closure. */
bsdf_transparent_setup(sd, bsdf->weight, path_flag);
bsdf->type = CLOSURE_NONE_ID;
bsdf->sample_weight = 0.0f;
return 0;
}