|
Blender V5.3
|
#include "kernel/constants.h"#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 228 of file bsdf_principled_hair_huang.h.
References arc_length(), ccl_device_inline, sinf, sqr, and sqrtf.
Referenced by arc_length(), bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), blender::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 362 of file bsdf_principled_hair_huang.h.
References bsdf_Go(), bsdf_lambda(), and ccl_device_inline.
Referenced by bsdf_Go(), 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 925 of file bsdf_principled_hair_huang.h.
References A, bsdf_hair_huang_albedo(), 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(), and bsdf_hair_huang_albedo().
| ccl_device void bsdf_hair_huang_blur | ( | ccl_private ShaderClosure * | sc, |
| const float | roughness ) |
Definition at line 916 of file bsdf_principled_hair_huang.h.
References bsdf_hair_huang_blur(), ccl_device, ccl_private, fmaxf, and HuangHairBSDF::roughness.
Referenced by bsdf_blur(), and bsdf_hair_huang_blur().
| ccl_device_forceinline float bsdf_hair_huang_energy_scale | ( | KernelGlobals | kg, |
| const float | mu, | ||
| const float | rough, | ||
| const float | ior ) |
Definition at line 315 of file bsdf_principled_hair_huang.h.
References bsdf_hair_huang_energy_scale(), ccl_device_forceinline, fabsf, GGX_GLASS_E_RES_IOR, GGX_GLASS_E_RES_MU, GGX_GLASS_E_RES_ROUGH, kernel_data, lookup_table_read_3D(), mu_to_y_index(), sqrtf, y, and z().
Referenced by bsdf_hair_huang_energy_scale(), 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 842 of file bsdf_principled_hair_huang.h.
References acosf, b, bsdf_hair_huang_eval(), 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(), and bsdf_hair_huang_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 369 of file bsdf_principled_hair_huang.h.
References arc_length(), b, bsdf_D(), bsdf_G(), bsdf_hair_huang_energy_scale(), bsdf_hair_huang_eval_r(), ccl_device, ccl_private, ceilf, d_gamma_d_h(), dot(), F, float, fresnel_dielectric_cos(), G, h_to_gamma(), 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(), and bsdf_hair_huang_eval_r().
| 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 439 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_residual(), 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(), 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(), 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(), and bsdf_hair_huang_eval_residual().
| ccl_device Spectrum bsdf_hair_huang_eval_trrt | ( | const float | T, |
| const float | R, | ||
| const Spectrum | A ) |
Definition at line 429 of file bsdf_principled_hair_huang.h.
References A, bsdf_hair_huang_eval_trrt(), ccl_device, max, one_spectrum, R, sqr, and T.
Referenced by bsdf_hair_huang_eval_residual(), and bsdf_hair_huang_eval_trrt().
| 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 624 of file bsdf_principled_hair_huang.h.
References average(), b, bsdf_Go(), bsdf_hair_huang_energy_scale(), bsdf_hair_huang_sample(), 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_hair_huang_sample(), and bsdf_sample().
| ccl_device_inline float cos_theta | ( | const float3 | w | ) |
Definition at line 86 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, cos_theta(), safe_sqrtf(), sqr, and w().
Referenced by aerosol_phase_function(), brdf_f82_tint_lut(), brdf_lut(), bsdf_ashikhmin_shirley_sample(), bsdf_ashikhmin_shirley_sample_first_quadrant(), bsdf_hair_huang_eval(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), bsdf_lut(), bsdf_lut(), bxdf_ggx_light_reflection(), bxdf_ggx_light_thin_glass_transmission(), bxdf_ggx_light_transmission(), bxdf_ggx_sample_reflection(), bxdf_ggx_sample_vndf(), bxdf_translucent_sample(), cos_theta(), dir_theta(), F_eta(), from_incident_vector(), SkyMultipleScattering::get_inscattering(), eevee::detail::get_isotropic_coords(), SkyMultipleScattering::get_transmittance(), eevee::lightprobe::volume::grid_bias_sample_coord(), workbench::prepass::hair_random_normal(), eevee::init_globals_curves(), light_tree_importance(), SkyMultipleScattering::lookup_multiscattering(), SkyMultipleScattering::lookup_transmittance(), SkyMultipleScattering::lookup_transmittance_at_ground(), eevee::lut::GGXBrdfData::lut_coords_get(), eevee::lut::GGXBsdfData::lut_coords_get(), eevee::lut::GGXBtdfGt1Data::lut_coords_get(), mnee_compute_transfer_matrix(), mnee_setup_manifold_vertex(), molecular_phase_function(), eevee::LTCData::pack_ltc_lut(), 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(), sample_cos_hemisphere(), sample_cos_hemisphere(), blender::eevee::Sampling::sample_hemisphere(), sample_hemisphere(), eevee::LTCData::sample_ltc_lut(), blender::eevee::Sampling::sample_sphere(), sample_sphere(), sample_uniform_cone(), sample_uniform_cone(), eevee::lut::GGXBrdfData::sample_utility_tx(), eevee::lut::GGXBsdfData::sample_utility_tx(), eevee::lut::GGXBtdfGt1Data::sample_utility_tx(), eevee::shadow_normal_offset(), eevee::shadow_pcf_offset(), eevee::shadow_terminator_offset(), sin_phi(), sincos_phi(), spherical_cos_to_direction(), sphg_dir(), spot_light_sample(), tan_theta(), overlay::unpack_line_data(), volume_draine_eval(), volume_fournier_forand_eval(), volume_henyey_greenstein_eval(), volume_phase_function(), 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 181 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, d_gamma_d_h(), fast_cosf(), fast_sincosf(), is_circular(), safe_divide(), float2::x, and float2::y.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), and d_gamma_d_h().
| ccl_device_inline float dir_phi | ( | const float3 | w | ) |
Definition at line 124 of file bsdf_principled_hair_huang.h.
References atan2f, ccl_device_inline, dir_phi(), and w().
Referenced by bsdf_hair_huang_eval(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), dir_phi(), and dir_sph().
| ccl_device_inline float2 dir_sph | ( | const float3 | w | ) |
Definition at line 131 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, dir_phi(), dir_sph(), dir_theta(), make_float2, and w().
Referenced by dir_sph().
| ccl_device_inline float dir_theta | ( | const float3 | w | ) |
Definition at line 117 of file bsdf_principled_hair_huang.h.
References atan2f, ccl_device_inline, cos_theta(), dir_theta(), sin_theta(), and w().
Referenced by dir_sph(), and dir_theta().
| ccl_device_inline float h_to_gamma | ( | const float | h_div_r, |
| const float | b, | ||
| const float3 | wi ) |
Definition at line 175 of file bsdf_principled_hair_huang.h.
References acosf, asinf, atan2f, b, ccl_device_inline, h_to_gamma(), is_circular(), float3::x, and float3::z.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and h_to_gamma().
| ccl_device_inline bool is_circular | ( | const float | b | ) |
Definition at line 104 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, and is_circular().
Referenced by bsdf_hair_huang_eval(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), d_gamma_d_h(), h_to_gamma(), is_circular(), phi_to_h(), sphg_dir(), to_gamma(), and to_phi().
| ccl_device_inline bool is_nearfield | ( | const ccl_private HuangHairBSDF * | bsdf | ) |
Definition at line 233 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, ccl_private, and is_nearfield().
Referenced by bsdf_hair_huang_eval(), bsdf_hair_huang_sample(), and is_nearfield().
| ccl_device_inline bool microfacet_visible | ( | const float3 | v, |
| const float3 | m, | ||
| const float3 | h ) |
Definition at line 347 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, dot(), and microfacet_visible().
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), microfacet_visible(), and microfacet_visible().
| ccl_device_inline bool microfacet_visible | ( | const float3 | wi, |
| const float3 | wo, | ||
| const float3 | m, | ||
| const float3 | h ) |
Definition at line 353 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 161 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, fast_sincosf(), fast_sinf(), is_circular(), phi_to_h(), sincos_phi(), to_gamma(), float2::x, and float2::y.
Referenced by bsdf_hair_huang_eval(), and phi_to_h().
| ccl_device_inline float3 sample_wh | ( | const float | roughness, |
| const float3 | wi, | ||
| const float3 | wm, | ||
| const float2 | rand ) |
Definition at line 330 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, make_orthonormals(), microfacet_ggx_sample_vndf(), sample_wh(), to_global(), and to_local().
Referenced by bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and sample_wh().
| ccl_device float sin_phi | ( | const float3 | w | ) |
Definition at line 98 of file bsdf_principled_hair_huang.h.
References ccl_device, cos_theta(), sin_phi(), and w().
Referenced by blender::bmo_create_cone_exec(), blender::bmo_create_uvsphere_exec(), bsdf_ashikhmin_shirley_sample_first_quadrant(), mnee_compute_transfer_matrix(), mnee_sample_bsdf_dh(), sample_circle(), sin_phi(), sphg_dir(), to_gamma(), and triangle_light_sample().
| ccl_device_inline float sin_theta | ( | const float3 | w | ) |
Definition at line 80 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, sin_theta(), and w().
Referenced by background_cdf(), background_map_pdf(), background_map_sample(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), bxdf_ggx_sample_reflection(), bxdf_ggx_sample_vndf(), blender::geometry::calculate_sphere_vertex_data(), dir_theta(), eevee::camera::equirectangular_to_direction(), workbench::prepass::hair_random_normal(), eevee::init_globals_curves(), light_tree_importance(), mnee_compute_transfer_matrix(), mnee_sample_bsdf_dh(), mnee_setup_manifold_vertex(), overlay::pack_line_data(), pack_line_data(), sample_cos_hemisphere(), blender::eevee::Sampling::sample_hemisphere(), sample_hemisphere(), blender::eevee::Sampling::sample_sphere(), sample_sphere(), sample_uniform_cone(), eevee::shadow_pcf_offset(), sin_theta(), spherical_cos_to_direction(), sphg_dir(), tan_theta(), and overlay::unpack_line_data().
| ccl_device float2 sincos_phi | ( | const float3 | w | ) |
Definition at line 109 of file bsdf_principled_hair_huang.h.
References ccl_device, cos_theta(), make_float2, sincos_phi(), and w().
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), phi_to_h(), and sincos_phi().
| ccl_device_inline float3 sphg_dir | ( | const float | theta, |
| const float | gamma, | ||
| const float | b ) |
Definition at line 203 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(), sphg_dir(), and sqr.
Referenced by bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and sphg_dir().
| ccl_device_inline float tan_theta | ( | const float3 | w | ) |
Definition at line 92 of file bsdf_principled_hair_huang.h.
References ccl_device_inline, cos_theta(), sin_theta(), tan_theta(), and w().
Referenced by bsdf_hair_huang_eval(), and tan_theta().
| ccl_device_inline float to_gamma | ( | const float | phi, |
| const float | b ) |
Definition at line 148 of file bsdf_principled_hair_huang.h.
References atan2f, b, ccl_device_inline, fast_sincosf(), is_circular(), sin_phi(), and to_gamma().
Referenced by phi_to_h(), and to_gamma().
| ccl_device_inline float to_phi | ( | const float | gamma, |
| const float | b ) |
Definition at line 137 of file bsdf_principled_hair_huang.h.
References atan2f, b, ccl_device_inline, fast_sincosf(), is_circular(), and to_phi().
Referenced by bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and to_phi().
| ccl_device_inline float2 to_point | ( | const float | gamma, |
| const float | b ) |
Definition at line 194 of file bsdf_principled_hair_huang.h.
References b, ccl_device_inline, fast_sincosf(), make_float2, and to_point().
Referenced by bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), blender::isect_vert_calc_z(), and to_point().