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 767eb3cd6a - Show all commits

View File

@ -3698,7 +3698,10 @@ MicrofacetHairBsdfNode::MicrofacetHairBsdfNode() : BsdfBaseNode(get_node_type())
void MicrofacetHairBsdfNode::attributes(Shader *shader, AttributeRequestSet *attributes)
{
/* Make sure we have the normal for elliptical cross section tracking */
attributes->add(ATTR_STD_VERTEX_NORMAL);
if (model_type == NODE_MICROFACET_HAIR_ELLIPTIC_BECKMANN ||
model_type == NODE_MICROFACET_HAIR_ELLIPTIC_GGX) {
attributes->add(ATTR_STD_VERTEX_NORMAL);
}
if (!input("Random")->link) {
attributes->add(ATTR_STD_CURVE_RANDOM);