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 1a6b4c6d0c - Show all commits

View File

@ -786,7 +786,11 @@ ccl_device int bsdf_microfacet_hair_sample(const KernelGlobals kg,
const float trt = average(TRT);
const float trrt = average(TRRT);
const float total_energy = r + tt + trt + trrt;
kernel_assert(total_energy > 0.0f);
if (total_energy == 0.0f) {
*pdf = 0.0f;
return LABEL_NONE;
}
float3 local_O;