|
Blender V5.0
|
#include "kernel/types.h"#include "kernel/closure/bsdf_microfacet.h"#include "kernel/closure/bsdf_principled_hair_chiang.h"#include "kernel/closure/bsdf_transparent.h"#include "kernel/closure/bsdf_util.h"#include "kernel/sample/lcg.h"Go to the source code of this file.
Classes | |
| struct | HuangHairExtra |
| struct | HuangHairBSDF |
| ccl_device_inline float arc_length | ( | const float | e2, |
| const float | gamma ) |
Definition at line 227 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, sinf, sqr, and sqrtf.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), compute_bbone_segment_boundaries(), and blender::ed::space_node::viewer_linking::get_viewer_node_position_candidates().
| ccl_device_inline float bsdf_Go | ( | const float | alpha2, |
| const float | cos_NI, | ||
| const float | cos_NO ) |
Definition at line 358 of file bsdf_principled_hair_huang.h.
References bsdf_lambda(), and ccl_device_inline.
Referenced by bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().
| ccl_device Spectrum bsdf_hair_huang_albedo | ( | const ccl_private ShaderData * | , |
| const ccl_private ShaderClosure * | sc ) |
Definition at line 921 of file bsdf_principled_hair_huang.h.
References A, ccl_device, ccl_private, cos_from_sin(), dot(), exp, fresnel_dielectric(), make_float3(), one_spectrum, refract_angle(), safe_divide(), sqr, and float3::y.
Referenced by bsdf_albedo().
| ccl_device void bsdf_hair_huang_blur | ( | ccl_private ShaderClosure * | sc, |
| const float | roughness ) |
Definition at line 912 of file bsdf_principled_hair_huang.h.
References ccl_device, ccl_private, fmaxf, and HuangHairBSDF::roughness.
Referenced by bsdf_blur().
| ccl_device_forceinline float bsdf_hair_huang_energy_scale | ( | KernelGlobals | kg, |
| const float | mu, | ||
| const float | rough, | ||
| const float | ior ) |
Definition at line 314 of file bsdf_principled_hair_huang.h.
References ccl_device_forceinline, fabsf, kernel_data, lookup_table_read_3D(), sqrtf, and z().
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().
| ccl_device Spectrum bsdf_hair_huang_eval | ( | KernelGlobals | kg, |
| ccl_private ShaderData * | sd, | ||
| const ccl_private ShaderClosure * | sc, | ||
| const float3 | wo, | ||
| ccl_private float * | pdf ) |
Definition at line 838 of file bsdf_principled_hair_huang.h.
References acosf, b, bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), ccl_device, ccl_private, cos_theta(), dir_phi(), fabsf, fmaxf, intervals_intersection(), is_circular(), Interval< T >::is_empty(), is_nearfield(), isnan_safe(), kernel_assert, Interval< T >::length(), phi_to_h(), tan_theta(), tanf, to_local(), and zero_spectrum.
Referenced by bsdf_eval().
| ccl_device Spectrum bsdf_hair_huang_eval_r | ( | KernelGlobals | kg, |
| const ccl_private ShaderClosure * | sc, | ||
| const float3 | wi, | ||
| const float3 | wo ) |
Definition at line 365 of file bsdf_principled_hair_huang.h.
References arc_length(), b, bsdf_D(), bsdf_G(), bsdf_hair_huang_energy_scale(), ccl_device, ccl_private, ceilf, d_gamma_d_h(), dot(), F, float, fresnel_dielectric_cos(), G, h_to_gamma(), i, make_float3(), make_spectrum, microfacet_visible(), normalize, sincos_phi(), sphg_dir(), sqr, sqrtf, float3::x, float3::z, and zero_float3().
Referenced by bsdf_hair_huang_eval().
| ccl_device Spectrum bsdf_hair_huang_eval_residual | ( | KernelGlobals | kg, |
| const ccl_private ShaderClosure * | sc, | ||
| const float3 | wi, | ||
| const float3 | wo, | ||
| ccl_private uint * | rng_quadrature ) |
Definition at line 435 of file bsdf_principled_hair_huang.h.
References arc_length(), b, bsdf_D(), bsdf_G(), bsdf_Go(), bsdf_hair_huang_energy_scale(), bsdf_hair_huang_eval_trrt(), ccl_device, ccl_private, ceilf, cos_theta(), cosf, d_gamma_d_h(), dir_phi(), dot(), exp, fabsf, fresnel_dielectric(), fresnel_dielectric_cos(), h_to_gamma(), i, is_circular(), isfinite_safe(), lcg_step_float(), len, longitudinal_scattering(), M, M_1_2PI_F, M_2_PI_F, M_PI_F, make_float2, microfacet_visible(), N, reflect, refract_angle(), result, sample_wh(), sin_theta(), sincos_phi(), sphg_dir(), sqr, sqrtf, T1, T2, T3, to_phi(), to_point(), and zero_spectrum.
Referenced by bsdf_hair_huang_eval().
| ccl_device Spectrum bsdf_hair_huang_eval_trrt | ( | const float | T, |
| const float | R, | ||
| const Spectrum | A ) |
Definition at line 425 of file bsdf_principled_hair_huang.h.
References A, ccl_device, max, one_spectrum, R, sqr, and T.
Referenced by bsdf_hair_huang_eval_residual().
| ccl_device int bsdf_hair_huang_sample | ( | const KernelGlobals | kg, |
| const ccl_private ShaderClosure * | sc, | ||
| ccl_private ShaderData * | sd, | ||
| const float3 | rand, | ||
| ccl_private Spectrum * | eval, | ||
| ccl_private float3 * | wo, | ||
| ccl_private float * | pdf, | ||
| ccl_private float2 * | sampled_roughness ) |
Definition at line 620 of file bsdf_principled_hair_huang.h.
References average(), b, bsdf_Go(), bsdf_hair_huang_energy_scale(), ccl_device, ccl_private, cos_from_sin(), cos_theta(), cosf, dir_phi(), dot(), exp, expf, fabsf, fast_sincosf(), fresnel_dielectric(), h_to_gamma(), is_circular(), is_nearfield(), kernel_assert, LABEL_GLOSSY, LABEL_NONE, LABEL_REFLECT, lcg_step_float(), len, logf, M_2PI_F, M_PI_F, make_float2, make_float3(), make_spectrum, max, microfacet_visible(), one_spectrum, R, reflect, refract_angle(), HuangHairBSDF::roughness, sample_wh(), sin_theta(), sphg_dir(), sqr, sqrt, sqrtf, T1, T2, T3, to_global(), to_phi(), to_point(), TR, float3::x, float3::y, float3::z, and zero_spectrum.
Referenced by bsdf_sample().
| ccl_device_inline float cos_theta | ( | const float3 | w | ) |
Definition at line 85 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, safe_sqrtf(), sqr, and w().
Referenced by aerosol_phase_function(), bsdf_ashikhmin_shirley_sample(), bsdf_ashikhmin_shirley_sample_first_quadrant(), bsdf_hair_huang_eval(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), dir_theta(), SkyMultipleScattering::get_inscattering(), SkyMultipleScattering::get_transmittance(), light_tree_importance(), SkyMultipleScattering::lookup_multiscattering(), SkyMultipleScattering::lookup_transmittance(), SkyMultipleScattering::lookup_transmittance_at_ground(), mnee_compute_transfer_matrix(), mnee_setup_manifold_vertex(), molecular_phase_function(), pdf_cos_hemisphere(), phase_draine(), phase_draine_sample(), phase_fournier_forand(), phase_fournier_forand_impl(), phase_fournier_forand_newton(), phase_fournier_forand_sample(), phase_henyey_greenstein(), phase_henyey_greenstein_sample(), phase_rayleigh(), phase_rayleigh_sample(), phase_sample_direction(), point_light_sample(), blender::eevee::Sampling::sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), sample_uniform_cone(), sin_phi(), sincos_phi(), spherical_cos_to_direction(), sphg_dir(), spot_light_sample(), tan_theta(), volume_draine_eval(), volume_fournier_forand_eval(), volume_henyey_greenstein_eval(), and volume_rayleigh_eval().
| ccl_device_inline float d_gamma_d_h | ( | const float2 | sincos_phi_i, |
| const float | gamma, | ||
| const float | b ) |
Definition at line 180 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, fast_cosf(), fast_sincosf(), is_circular(), safe_divide(), float2::x, and float2::y.
Referenced by bsdf_hair_huang_eval_r(), and bsdf_hair_huang_eval_residual().
| ccl_device_inline float dir_phi | ( | const float3 | w | ) |
Definition at line 123 of file bsdf_principled_hair_huang.h.
References atan2f, ccl_device_inline, and w().
Referenced by bsdf_hair_huang_eval(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and dir_sph().
| ccl_device_inline float2 dir_sph | ( | const float3 | w | ) |
Definition at line 130 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, dir_phi(), dir_theta(), make_float2, and w().
| ccl_device_inline float dir_theta | ( | const float3 | w | ) |
Definition at line 116 of file bsdf_principled_hair_huang.h.
References atan2f, ccl_device_inline, cos_theta(), sin_theta(), and w().
Referenced by dir_sph().
| ccl_device_inline float h_to_gamma | ( | const float | h_div_r, |
| const float | b, | ||
| const float3 | wi ) |
Definition at line 174 of file bsdf_principled_hair_huang.h.
References acosf, asinf, atan2f, b, ccl_device_inline, is_circular(), float3::x, and float3::z.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().
| ccl_device_inline bool is_circular | ( | const float | b | ) |
Definition at line 103 of file bsdf_principled_hair_huang.h.
References b, and ccl_device_inline.
Referenced by bsdf_hair_huang_eval(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), d_gamma_d_h(), h_to_gamma(), phi_to_h(), sphg_dir(), to_gamma(), and to_phi().
| ccl_device_inline bool is_nearfield | ( | const ccl_private HuangHairBSDF * | bsdf | ) |
Definition at line 232 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, and ccl_private.
Referenced by bsdf_hair_huang_eval(), and bsdf_hair_huang_sample().
| ccl_device_inline bool microfacet_visible | ( | const float3 | v, |
| const float3 | m, | ||
| const float3 | h ) |
Definition at line 343 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, dot(), and v.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and microfacet_visible().
| ccl_device_inline bool microfacet_visible | ( | const float3 | wi, |
| const float3 | wo, | ||
| const float3 | m, | ||
| const float3 | h ) |
Definition at line 349 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, and microfacet_visible().
| ccl_device_inline float phi_to_h | ( | const float | phi, |
| const float | b, | ||
| const float3 | wi ) |
Definition at line 160 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, fast_sincosf(), fast_sinf(), is_circular(), sincos_phi(), to_gamma(), float2::x, and float2::y.
Referenced by bsdf_hair_huang_eval().
| ccl_device_inline float3 sample_wh | ( | const float | roughness, |
| const float3 | wi, | ||
| const float3 | wm, | ||
| const float2 | rand ) |
Definition at line 326 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, make_orthonormals(), microfacet_ggx_sample_vndf(), to_global(), and to_local().
Referenced by bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().
| ccl_device float sin_phi | ( | const float3 | w | ) |
Definition at line 97 of file bsdf_principled_hair_huang.h.
References ccl_device, cos_theta(), and w().
Referenced by bmo_create_cone_exec(), bmo_create_uvsphere_exec(), bsdf_ashikhmin_shirley_sample_first_quadrant(), mnee_compute_transfer_matrix(), mnee_sample_bsdf_dh(), sphg_dir(), to_gamma(), and triangle_light_sample().
| ccl_device_inline float sin_theta | ( | const float3 | w | ) |
Definition at line 79 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, and w().
Referenced by background_cdf(), background_map_pdf(), background_map_sample(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), blender::geometry::calculate_sphere_vertex_data(), dir_theta(), light_tree_importance(), mnee_compute_transfer_matrix(), mnee_sample_bsdf_dh(), mnee_setup_manifold_vertex(), blender::eevee::Sampling::sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), spherical_cos_to_direction(), sphg_dir(), and tan_theta().
| ccl_device float2 sincos_phi | ( | const float3 | w | ) |
Definition at line 108 of file bsdf_principled_hair_huang.h.
References ccl_device, cos_theta(), make_float2, and w().
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), and phi_to_h().
| ccl_device_inline float3 sphg_dir | ( | const float | theta, |
| const float | gamma, | ||
| const float | b ) |
Definition at line 202 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, cos_theta(), fabsf, fast_sincosf(), inversesqrtf(), is_circular(), make_float3(), signf(), sin_phi(), sin_theta(), and sqr.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().
| ccl_device_inline float tan_theta | ( | const float3 | w | ) |
Definition at line 91 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, cos_theta(), sin_theta(), and w().
Referenced by bsdf_hair_huang_eval().
| ccl_device_inline float to_gamma | ( | const float | phi, |
| const float | b ) |
Definition at line 147 of file bsdf_principled_hair_huang.h.
References atan2f, b, ccl_device_inline, fast_sincosf(), is_circular(), and sin_phi().
Referenced by phi_to_h().
| ccl_device_inline float to_phi | ( | const float | gamma, |
| const float | b ) |
Definition at line 136 of file bsdf_principled_hair_huang.h.
References atan2f, b, ccl_device_inline, fast_sincosf(), and is_circular().
Referenced by bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().
| ccl_device_inline float2 to_point | ( | const float | gamma, |
| const float | b ) |
Definition at line 193 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, fast_sincosf(), and make_float2.
Referenced by bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_sample().