|
Blender V4.5
|
Go to the source code of this file.
| ccl_device_inline float bsdf_principled_hair_albedo_roughness_scale | ( | const float | azimuthal_roughness | ) |
Definition at line 294 of file bsdf_util.h.
References ccl_device_inline, and x.
Referenced by bsdf_hair_chiang_albedo(), and bsdf_principled_hair_sigma_from_reflectance().
| ccl_device_inline Spectrum bsdf_principled_hair_sigma_from_concentration | ( | const float | eumelanin, |
| const float | pheomelanin ) |
Definition at line 309 of file bsdf_util.h.
References ccl_device_inline, make_float3(), and rgb_to_spectrum().
Referenced by svm_node_closure_bsdf().
| ccl_device_inline Spectrum bsdf_principled_hair_sigma_from_reflectance | ( | const Spectrum | color, |
| const float | azimuthal_roughness ) |
Definition at line 302 of file bsdf_util.h.
References bsdf_principled_hair_albedo_roughness_scale(), and log.
Referenced by svm_node_closure_bsdf().
| ccl_device_inline Spectrum closure_layering_weight | ( | const Spectrum | layer_albedo, |
| const Spectrum | weight ) |
Definition at line 322 of file bsdf_util.h.
References ccl_device_inline, reduce_max(), safe_divide_color(), and saturatef.
Referenced by flatten_closure_tree(), and svm_node_closure_bsdf().
| ccl_device float3 ensure_valid_specular_reflection | ( | const float3 | Ng, |
| const float3 | I, | ||
| float3 | N ) |
Definition at line 204 of file bsdf_util.h.
References b, ccl_device, dot(), I, kernel_assert, min, N, R, safe_normalize_fallback(), safe_sqrtf(), sqr(), and X.
Referenced by maybe_ensure_valid_specular_reflection().
| ccl_device float F0_from_ior | ( | const float | ior | ) |
Definition at line 172 of file bsdf_util.h.
References ccl_device, and sqr().
Referenced by bsdf_microfacet_estimate_albedo(), bsdf_microfacet_setup_fresnel_generalized_schlick(), microfacet_fresnel(), and svm_node_closure_bsdf().
| ccl_device Spectrum fresnel_conductor | ( | const float | cosi, |
| const Spectrum | eta, | ||
| const Spectrum | k ) |
Definition at line 114 of file bsdf_util.h.
References ccl_device, and make_spectrum.
Referenced by fresnel_conductor_Fss(), and microfacet_fresnel().
| ccl_device_inline Spectrum fresnel_conductor_Fss | ( | const Spectrum | eta, |
| const Spectrum | k ) |
Definition at line 157 of file bsdf_util.h.
References ccl_device_inline, fresnel_conductor(), fresnel_f82_B(), fresnel_f82_Fss(), and saturate.
Referenced by bsdf_microfacet_setup_fresnel_conductor().
| ccl_device_forceinline float fresnel_dielectric | ( | const float | cos_theta_i, |
| const float | eta, | ||
| ccl_private float * | r_cos_theta_t ) |
Definition at line 69 of file bsdf_util.h.
References average(), ccl_device_forceinline, ccl_private, and fresnel_dielectric_polarized().
Referenced by bsdf_hair_huang_albedo(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and microfacet_fresnel().
| ccl_device float fresnel_dielectric_cos | ( | const float | cosi, |
| const float | eta ) |
Definition at line 86 of file bsdf_util.h.
References A, B, ccl_device, fabsf, and sqrtf.
Referenced by bsdf_hair_chiang_albedo(), bsdf_hair_chiang_eval(), bsdf_hair_chiang_sample(), bsdf_hair_huang_eval_r(), bsdf_hair_huang_eval_residual(), interpolate_fresnel_color(), svm_node_fresnel(), and svm_node_layer_weight().
| ccl_device_inline float fresnel_dielectric_Fss | ( | const float | eta | ) |
Definition at line 106 of file bsdf_util.h.
References ccl_device_inline.
Referenced by bsdf_microfacet_setup_fresnel_dielectric(), bsdf_microfacet_setup_fresnel_dielectric_tint(), and bsdf_microfacet_setup_fresnel_generalized_schlick().
| CCL_NAMESPACE_BEGIN ccl_device float2 fresnel_dielectric_polarized | ( | float | cos_theta_i, |
| const float | eta, | ||
| ccl_private float * | r_cos_theta_t, | ||
| ccl_private float2 * | r_phi ) |
Definition at line 22 of file bsdf_util.h.
References ccl_device, ccl_private, fabsf, isnan_safe(), kernel_assert, M_PI_F, make_float2(), one_float2(), safe_sqrtf(), sqr(), and zero_float2().
Referenced by fresnel_dielectric(), and fresnel_iridescence().
| ccl_device_inline Spectrum fresnel_f82_B | ( | const Spectrum | F0, |
| const Spectrum | F82 ) |
Definition at line 148 of file bsdf_util.h.
References ccl_device_inline, mix, one_spectrum, and sqr().
Referenced by fresnel_conductor_Fss().
| ccl_device_inline Spectrum fresnel_f82_Fss | ( | const Spectrum | F0, |
| const Spectrum | B ) |
Definition at line 127 of file bsdf_util.h.
References B, ccl_device_inline, mix, and one_spectrum.
Referenced by bsdf_microfacet_setup_fresnel_f82_tint(), and fresnel_conductor_Fss().
| ccl_device_inline Spectrum fresnel_f82tint_B | ( | const Spectrum | F0, |
| const Spectrum | tint ) |
Definition at line 133 of file bsdf_util.h.
References ccl_device_inline, mix, one_spectrum, and sqr().
Referenced by bsdf_microfacet_setup_fresnel_f82_tint().
| ccl_device Spectrum fresnel_iridescence | ( | KernelGlobals | kg, |
| float | eta1, | ||
| float | eta2, | ||
| float | eta3, | ||
| float | cos_theta_1, | ||
| const float | thickness, | ||
| ccl_private float * | r_cos_theta_3 ) |
Definition at line 380 of file bsdf_util.h.
References ccl_device, ccl_private, fresnel_dielectric_polarized(), iridescence_airy_summation(), isequal(), kernel_data, M_PI_F, make_float2(), make_float3(), mix, one_float2(), one_spectrum, R, saturate, smoothstep(), float2::x, xyz_to_rgb(), and float2::y.
Referenced by microfacet_fresnel().
| ccl_device_forceinline Spectrum interpolate_fresnel_color | ( | const float3 | L, |
| const float3 | H, | ||
| const float | ior, | ||
| Spectrum | F0 ) |
Definition at line 185 of file bsdf_util.h.
References ccl_device_forceinline, dot(), fresnel_dielectric_cos(), H, inverse_lerp(), L, mix, and one_spectrum.
| ccl_device float ior_from_F0 | ( | const float | f0 | ) |
Definition at line 166 of file bsdf_util.h.
References ccl_device, clamp(), and sqrtf.
Referenced by ior_parametrization(), osl_closure_generalized_schlick_bsdf_setup(), and svm_node_closure_bsdf().
| ccl_device_inline float3 iridescence_airy_summation | ( | const float | T121, |
| const float | R12, | ||
| const float | R23, | ||
| const float | OPD, | ||
| const float | phi ) |
Definition at line 357 of file bsdf_util.h.
References ccl_device_inline, iridescence_lookup_sensitivity(), make_float3(), one_float3(), R, sqr(), and sqrtf.
Referenced by fresnel_iridescence().
| ccl_device_inline Spectrum iridescence_lookup_sensitivity | ( | const float | OPD, |
| const float | shift ) |
Evaluate the sensitivity functions for the Fourier-space spectral integration. The code here uses the Gaussian fit for the CIE XYZ curves that is provided in the reference implementation. For details on what this actually represents, see the paper. In theory we should pre-compute the sensitivity functions for the working RGB color-space, remap them to be functions of (light) frequency, take their Fourier transform and store them as a LUT that gets looked up here. In practice, using the XYZ fit and converting the result from XYZ to RGB is easier.
Definition at line 345 of file bsdf_util.h.
References ccl_device_inline, cos, cosf, exp, expf, M_2PI_F, make_float3(), pos, sqr(), sqrt, and float3::x.
Referenced by iridescence_airy_summation().
| ccl_device float3 maybe_ensure_valid_specular_reflection | ( | ccl_private ShaderData * | sd, |
| const float3 | N ) |
Definition at line 281 of file bsdf_util.h.
References ccl_device, ccl_private, ensure_valid_specular_reflection(), isequal(), N, PRIMITIVE_CURVE, and SD_USE_BUMP_MAP_CORRECTION.
Referenced by osl_closure_ashikhmin_velvet_setup(), osl_closure_bssrdf_setup(), osl_closure_conductor_bsdf_setup(), osl_closure_dielectric_bsdf_setup(), osl_closure_diffuse_toon_setup(), osl_closure_generalized_schlick_bsdf_setup(), osl_closure_glossy_toon_setup(), osl_closure_hair_chiang_setup(), osl_closure_hair_reflection_setup(), osl_closure_hair_transmission_setup(), osl_closure_microfacet_f82_tint_setup(), osl_closure_microfacet_multi_ggx_aniso_setup(), osl_closure_microfacet_multi_ggx_glass_setup(), osl_closure_microfacet_setup(), osl_closure_phong_ramp_setup(), osl_closure_reflection_setup(), osl_closure_refraction_setup(), osl_closure_subsurface_bssrdf_setup(), and svm_node_closure_bsdf().
| ccl_device_inline float3 refract_angle | ( | const float3 | incident, |
| const float3 | normal, | ||
| const float | cos_theta_t, | ||
| const float | inv_eta ) |
Definition at line 78 of file bsdf_util.h.
References ccl_device_inline, and dot().
Referenced by bsdf_hair_huang_albedo(), bsdf_hair_huang_eval_residual(), bsdf_hair_huang_sample(), and bsdf_microfacet_sample().
| ccl_device float schlick_fresnel | ( | const float | u | ) |
Definition at line 177 of file bsdf_util.h.
References ccl_device, and clamp().