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
2 changed files with 0 additions and 5 deletions
Showing only changes of commit 40e45dee57 - Show all commits

View File

@ -606,7 +606,6 @@ ccl_device int bsdf_microfacet_hair_sample(const KernelGlobals kg,
const float roughness = bsdf->roughness;
*sampled_roughness = make_float2(roughness, roughness);
*eta = bsdf->eta;
*eval = zero_spectrum();
/* Treat as transparent material if intersection lies outside of the projected radius. */
if (fabsf(bsdf->h) > bsdf->extra->radius) {
weizhen marked this conversation as resolved Outdated

Since both of these are already known in the setup function at shader evaluation time, we might want to implement the "default to transparent" logic there?

Since both of these are already known in the setup function at shader evaluation time, we might want to implement the "default to transparent" logic there?
@ -619,7 +618,6 @@ ccl_device int bsdf_microfacet_hair_sample(const KernelGlobals kg,
if (bsdf->extra->R <= 0.0f && bsdf->extra->TT <= 0.0f && bsdf->extra->TRT <= 0.0f) {
weizhen marked this conversation as resolved Outdated

Same here.

Same here.
/* Early out for inactive lobe. */
*pdf = 0.0f;
return LABEL_NONE;
}
@ -843,7 +841,6 @@ ccl_device Spectrum bsdf_microfacet_hair_eval(KernelGlobals kg,
/* Treat as transparent material if intersection lies outside of the projected radius. */
if (fabsf(bsdf->h) > bsdf->extra->radius) {
*pdf = 0.0f;
return zero_spectrum();
}

View File

@ -7,8 +7,6 @@
#pragma once
#include "kernel/util/lookup_table.h"
CCL_NAMESPACE_BEGIN
/* Compute fresnel reflectance. Also return the dot product of the refracted ray and the normal as