Not sure why this was 4 before, there are only 2 closures, ...HairBSDF
and ...HairExtra
.
These are utitily functions for matching direct color with absorption coefficient. They are designed for Principled Hair BSDF, and don't seem to match very well with the Microfacet Hair BSDF. Currently I just "borrow" these functions so direct coloring is also available for the new model. I could move the three shared functions to bsdf_util.h
, or duplicate them in bsdf_hair_microfacet.h
, if this matters.
The curve normal (which is needed for orienting the cross-section) is not considered in the legacy hair curve. I don't want to put too much effort into this if the legacy curve is to be discarded at some point.
tilt
in setup()
instead of eval()
and sample()
@iss the pull request is merged as bfd1836861, can you check if we can close the issue now?
Thanks for the patch. The two proposed alternatives require the same amount of memory (16 bytes more compared to the version with union
), but with variant
the intention of the code is clearer…
union
to variant