Blender  V2.93
Classes | Macros | Typedefs | Functions | Variables
bsdf_hair_principled.h File Reference
#include "kernel/kernel_color.h"

Go to the source code of this file.

Classes

struct  PrincipledHairExtra
 
struct  PrincipledHairBSDF
 

Macros

#define __BSDF_HAIR_PRINCIPLED_H__
 

Typedefs

typedef ccl_addr_space struct PrincipledHairBSDF PrincipledHairBSDF
 

Functions

ccl_device_inline float cos_from_sin (const float s)
 
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 float4 combine_with_energy (KernelGlobals *kg, float3 c)
 
ccl_device_inline void hair_attenuation (KernelGlobals *kg, float f, float3 T, float4 *Ap)
 
ccl_device_inline void hair_alpha_angles (float sin_theta_i, float cos_theta_i, float alpha, float *angles)
 
ccl_device float3 bsdf_principled_hair_eval (KernelGlobals *kg, const ShaderData *sd, const ShaderClosure *sc, const float3 omega_in, float *pdf)
 
ccl_device int bsdf_principled_hair_sample (KernelGlobals *kg, const ShaderClosure *sc, ShaderData *sd, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
 
ccl_device void bsdf_principled_hair_blur (ShaderClosure *sc, float roughness)
 
ccl_device_inline float bsdf_principled_hair_albedo_roughness_scale (const float azimuthal_roughness)
 
ccl_device float3 bsdf_principled_hair_albedo (ShaderClosure *sc)
 
ccl_device_inline float3 bsdf_principled_hair_sigma_from_reflectance (const float3 color, const float azimuthal_roughness)
 
ccl_device_inline float3 bsdf_principled_hair_sigma_from_concentration (const float eumelanin, const float pheomelanin)
 

Variables

CCL_NAMESPACE_BEGIN typedef ccl_addr_space struct PrincipledHairExtra PrincipledHairExtra
 

Macro Definition Documentation

◆ __BSDF_HAIR_PRINCIPLED_H__

#define __BSDF_HAIR_PRINCIPLED_H__

Definition at line 24 of file bsdf_hair_principled.h.

Typedef Documentation

◆ PrincipledHairBSDF

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 103 of file bsdf_hair_principled.h.

References sqr(), and x.

Referenced by log_bessel_I0(), and longitudinal_scattering().

◆ bsdf_principled_hair_albedo()

ccl_device float3 bsdf_principled_hair_albedo ( ShaderClosure sc)

◆ bsdf_principled_hair_albedo_roughness_scale()

ccl_device_inline float bsdf_principled_hair_albedo_roughness_scale ( const float  azimuthal_roughness)

◆ bsdf_principled_hair_blur()

ccl_device void bsdf_principled_hair_blur ( ShaderClosure sc,
float  roughness 
)

◆ bsdf_principled_hair_eval()

ccl_device float3 bsdf_principled_hair_eval ( KernelGlobals *  kg,
const ShaderData sd,
const ShaderClosure sc,
const float3  omega_in,
float pdf 
)

◆ bsdf_principled_hair_sample()

ccl_device int bsdf_principled_hair_sample ( KernelGlobals *  kg,
const ShaderClosure sc,
ShaderData sd,
float  randu,
float  randv,
float3 eval,
float3 omega_in,
float3 domega_in_dx,
float3 domega_in_dy,
float pdf 
)

◆ bsdf_principled_hair_sigma_from_concentration()

ccl_device_inline float3 bsdf_principled_hair_sigma_from_concentration ( const float  eumelanin,
const float  pheomelanin 
)

Definition at line 518 of file bsdf_hair_principled.h.

References make_float3.

Referenced by svm_node_closure_bsdf().

◆ bsdf_principled_hair_sigma_from_reflectance()

ccl_device_inline float3 bsdf_principled_hair_sigma_from_reflectance ( const float3  color,
const float  azimuthal_roughness 
)

Definition at line 511 of file bsdf_hair_principled.h.

References bsdf_principled_hair_albedo_roughness_scale(), and log3().

Referenced by svm_node_closure_bsdf().

◆ combine_with_energy()

ccl_device_inline float4 combine_with_energy ( KernelGlobals *  kg,
float3  c 
)

Definition at line 184 of file bsdf_hair_principled.h.

References Freestyle::c, kg, linear_rgb_to_gray(), and make_float4.

Referenced by hair_attenuation().

◆ cos_from_sin()

ccl_device_inline float cos_from_sin ( const float  s)

◆ delta_phi()

ccl_device_inline float delta_phi ( int  p,
float  gamma_o,
float  gamma_t 
)

◆ hair_alpha_angles()

ccl_device_inline void hair_alpha_angles ( float  sin_theta_i,
float  cos_theta_i,
float  alpha,
float angles 
)

Definition at line 260 of file bsdf_hair_principled.h.

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

Referenced by bsdf_principled_hair_eval(), and bsdf_principled_hair_sample().

◆ hair_attenuation()

ccl_device_inline void hair_attenuation ( KernelGlobals *  kg,
float  f,
float3  T,
float4 *  Ap 
)

◆ log_bessel_I0()

ccl_device_inline float log_bessel_I0 ( float  x)

Definition at line 124 of file bsdf_hair_principled.h.

References bessel_I0(), logf, M_LN_2PI_F, and x.

Referenced by longitudinal_scattering().

◆ logistic()

ccl_device_inline float logistic ( float  x,
float  s 
)

Definition at line 83 of file bsdf_hair_principled.h.

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

Referenced by trimmed_logistic().

◆ logistic_cdf()

ccl_device_inline float logistic_cdf ( float  x,
float  s 
)

Definition at line 90 of file bsdf_hair_principled.h.

References expf, and x.

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 148 of file bsdf_hair_principled.h.

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

Referenced by bsdf_principled_hair_sample().

◆ trimmed_logistic()

ccl_device_inline float trimmed_logistic ( float  x,
float  s 
)

Definition at line 137 of file bsdf_hair_principled.h.

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

Referenced by azimuthal_scattering().

◆ wrap_angle()

ccl_device_inline float wrap_angle ( float  a)

Definition at line 71 of file bsdf_hair_principled.h.

References Freestyle::a, M_2PI_F, and M_PI_F.

Referenced by azimuthal_scattering(), and dial_ghostarc_get_angles().

Variable Documentation

◆ PrincipledHairExtra