Skip to content

Commit 416410d

Browse files
authored
Add hair_chiang_bsdf closure definition from MaterialX (#1891)
Signed-off-by: Chris Kulla <[email protected]>
1 parent 453d25b commit 416410d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

src/shaders/stdosl.h

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -607,6 +607,39 @@ closure color subsurface_bssrdf(normal N, color albedo, color radius, float anis
607607
closure color sheen_bsdf(normal N, color albedo, float roughness) BUILTIN;
608608

609609

610+
// Constructs a hair BSDF based on the Chiang hair shading model. This node does not support vertical layering.
611+
// \param N Normal vector of the surface.
612+
// \param curve_direction Direction of the hair geometry.
613+
// \param tint_R Color multiplier for the R-lobe.
614+
// \param tint_TT Color multiplier for the TT-lobe.
615+
// \param tint_TRT Color multiplier for the TRT-lobe.
616+
// \param ior Index of refraction.
617+
// \param longitudual_roughness_R Longitudinal roughness (ν) for the R-lobe , range [0.0, ∞)
618+
// \param longitudual_roughness_TT Longitudinal roughness (ν) for the TT-lobe , range [0.0, ∞)
619+
// \param longitudual_roughness_TRT Longitudinal roughness (ν) for the TRT-lobe, range [0.0, ∞)
620+
// \param azimuthal_roughness_R Azimuthal roughness (s) for the R-lobe , range [0.0, ∞)
621+
// \param azimuthal_roughness_TT Azimuthal roughness (s) for the TT-lobe , range [0.0, ∞)
622+
// \param azimuthal_roughness_TRT Azimuthal roughness (s) for the TRT-lobe, range [0.0, ∞)
623+
// \param cuticle_angle Cuticle angle in radians, Values above 0.5 tilt the scales towards the root of the fiber, range [0.0, 1.0], with 0.5 specifying no tilt.
624+
// \param absorption_coefficient Absorption coefficient normalized to the hair fiber diameter.
625+
closure color chiang_hair_bsdf(
626+
normal N,
627+
vector curve_direction,
628+
color tint_R,
629+
color tint_TT,
630+
color tint_TRT,
631+
float ior,
632+
float longitudual_roughness_R,
633+
float longitudual_roughness_TT,
634+
float longitudual_roughness_TRT,
635+
float azimuthal_roughness_R,
636+
float azimuthal_roughness_TT,
637+
float azimuthal_roughness_TRT,
638+
float cuticle_angle,
639+
color absorption_coefficient
640+
) BUILTIN;
641+
642+
610643
// -------------------------------------------------------------//
611644
// EDF closures //
612645
// -------------------------------------------------------------//

0 commit comments

Comments
 (0)