Blender V4.3
bsdf_principled_hair_chiang.h File Reference
#include <fenv.h>
#include "kernel/util/color.h"

Go to the source code of this file.

Classes

struct  ChiangHairBSDF
 

Typedefs

typedef CCL_NAMESPACE_BEGIN struct ChiangHairBSDF ChiangHairBSDF
 

Functions

ccl_device_inline float delta_phi (int p, float gamma_o, float gamma_t)
 
ccl_device_inline float wrap_angle (float a)
 
ccl_device_inline float logistic (float x, float s)
 
ccl_device_inline float logistic_cdf (float x, float s)
 
ccl_device_inline float bessel_I0 (float x)
 
ccl_device_inline float log_bessel_I0 (float x)
 
ccl_device_inline float trimmed_logistic (float x, float s)
 
ccl_device_inline float sample_trimmed_logistic (float u, float s)
 
ccl_device_inline float azimuthal_scattering (float phi, int p, float s, float gamma_o, float gamma_t)
 
ccl_device_inline float longitudinal_scattering (float sin_theta_i, float cos_theta_i, float sin_theta_o, float cos_theta_o, float v)
 
ccl_device_inline void hair_attenuation (KernelGlobals kg, float f, Spectrum T, ccl_private Spectrum *Ap, ccl_private float *Ap_energy)
 
ccl_device_inline void hair_alpha_angles (float sin_theta_o, float cos_theta_o, float alpha, ccl_private float *angles)
 
ccl_device Spectrum bsdf_hair_chiang_eval (KernelGlobals kg, ccl_private const ShaderData *sd, ccl_private const ShaderClosure *sc, const float3 wo, ccl_private float *pdf)
 
ccl_device int bsdf_hair_chiang_sample (KernelGlobals kg, ccl_private const ShaderClosure *sc, ccl_private ShaderData *sd, float3 rand, ccl_private Spectrum *eval, ccl_private float3 *wo, ccl_private float *pdf, ccl_private float2 *sampled_roughness)
 
ccl_device void bsdf_hair_chiang_blur (ccl_private ShaderClosure *sc, float roughness)
 
ccl_device Spectrum bsdf_hair_chiang_albedo (ccl_private const ShaderData *sd, ccl_private const ShaderClosure *sc)
 

Typedef Documentation

◆ ChiangHairBSDF

typedef CCL_NAMESPACE_BEGIN struct ChiangHairBSDF ChiangHairBSDF

Function Documentation

◆ azimuthal_scattering()

ccl_device_inline float azimuthal_scattering ( float phi,
int p,
float s,
float gamma_o,
float gamma_t )

◆ bessel_I0()

ccl_device_inline float bessel_I0 ( float x)

Definition at line 74 of file bsdf_principled_hair_chiang.h.

References sqr(), and x.

Referenced by log_bessel_I0(), and longitudinal_scattering().

◆ bsdf_hair_chiang_albedo()

◆ bsdf_hair_chiang_blur()

ccl_device void bsdf_hair_chiang_blur ( ccl_private ShaderClosure * sc,
float roughness )

Definition at line 453 of file bsdf_principled_hair_chiang.h.

References ccl_private, fmaxf, and ChiangHairBSDF::v.

Referenced by bsdf_blur().

◆ bsdf_hair_chiang_eval()

◆ bsdf_hair_chiang_sample()

◆ delta_phi()

◆ hair_alpha_angles()

ccl_device_inline void hair_alpha_angles ( float sin_theta_o,
float cos_theta_o,
float alpha,
ccl_private float * angles )

Definition at line 230 of file bsdf_principled_hair_chiang.h.

References cos_from_sin(), fabsf, sinf, and sqr().

Referenced by bsdf_hair_chiang_eval(), and bsdf_hair_chiang_sample().

◆ hair_attenuation()

◆ log_bessel_I0()

ccl_device_inline float log_bessel_I0 ( float x)

Definition at line 95 of file bsdf_principled_hair_chiang.h.

References bessel_I0(), logf, and x.

Referenced by longitudinal_scattering().

◆ logistic()

ccl_device_inline float logistic ( float x,
float s )

Definition at line 54 of file bsdf_principled_hair_chiang.h.

References expf, fabsf, sqr(), and v.

Referenced by trimmed_logistic().

◆ logistic_cdf()

ccl_device_inline float logistic_cdf ( float x,
float s )

Definition at line 61 of file bsdf_principled_hair_chiang.h.

References expf.

Referenced by sample_trimmed_logistic(), and trimmed_logistic().

◆ longitudinal_scattering()

ccl_device_inline float longitudinal_scattering ( float sin_theta_i,
float cos_theta_i,
float sin_theta_o,
float cos_theta_o,
float v )

◆ sample_trimmed_logistic()

ccl_device_inline float sample_trimmed_logistic ( float u,
float s )

Definition at line 119 of file bsdf_principled_hair_chiang.h.

References clamp(), logf, logistic_cdf(), and M_PI_F.

Referenced by bsdf_hair_chiang_sample().

◆ trimmed_logistic()

ccl_device_inline float trimmed_logistic ( float x,
float s )

Definition at line 108 of file bsdf_principled_hair_chiang.h.

References logistic(), logistic_cdf(), M_PI_F, and safe_divide().

Referenced by azimuthal_scattering().

◆ wrap_angle()

ccl_device_inline float wrap_angle ( float a)

Definition at line 48 of file bsdf_principled_hair_chiang.h.

References floorf, M_2PI_F, and M_PI_F.

Referenced by azimuthal_scattering(), and dial_ghostarc_get_angles().