|
Blender V4.3
|
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 233 of file bsdf_util.h.
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 248 of file bsdf_util.h.
References 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 241 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 261 of file bsdf_util.h.
References reduce_max(), safe_divide_color(), and saturatef.
Referenced by flatten_closure_tree(), and svm_node_closure_bsdf().
| ccl_device float3 ensure_valid_specular_reflection | ( | float3 | Ng, |
| float3 | I, | ||
| float3 | N ) |
Definition at line 144 of file bsdf_util.h.
References b, 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 | ( | float | ior | ) |
Definition at line 112 of file bsdf_util.h.
References sqr().
Referenced by bsdf_microfacet_setup_fresnel_generalized_schlick(), microfacet_fresnel(), and svm_node_closure_bsdf().
| ccl_device Spectrum fresnel_conductor | ( | float | cosi, |
| const Spectrum | eta, | ||
| const Spectrum | k ) |
Definition at line 95 of file bsdf_util.h.
References make_spectrum.
Referenced by bsdf_microfacet_setup_fresnel_conductor(), and microfacet_fresnel().
| ccl_device_forceinline float fresnel_dielectric | ( | float | cos_theta_i, |
| float | eta, | ||
| ccl_private float * | r_cos_theta_t ) |
Definition at line 63 of file bsdf_util.h.
References average(), 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 | ( | float | cosi, |
| float | eta ) |
Definition at line 80 of file bsdf_util.h.
References B, 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_NAMESPACE_BEGIN ccl_device float2 fresnel_dielectric_polarized | ( | float | cos_theta_i, |
| float | eta, | ||
| ccl_private float * | r_cos_theta_t, | ||
| ccl_private float2 * | r_phi ) |
Definition at line 16 of file bsdf_util.h.
References 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 Spectrum fresnel_iridescence | ( | KernelGlobals | kg, |
| float | eta1, | ||
| float | eta2, | ||
| float | eta3, | ||
| float | cos_theta_1, | ||
| float | thickness, | ||
| ccl_private float * | r_cos_theta_3 ) |
Definition at line 319 of file bsdf_util.h.
References float4_to_float3(), fresnel_dielectric_polarized(), iridescence_airy_summation(), isequal(), kernel_data, M_PI_F, make_float2(), 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 | ( | float3 | L, |
| float3 | H, | ||
| float | ior, | ||
| Spectrum | F0 ) |
Definition at line 125 of file bsdf_util.h.
References dot(), fresnel_dielectric_cos(), H, inverse_lerp(), L, mix, and one_spectrum.
| ccl_device float ior_from_F0 | ( | float | f0 | ) |
Definition at line 106 of file bsdf_util.h.
References 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 | ( | float | T121, |
| float | R12, | ||
| float | R23, | ||
| float | OPD, | ||
| float | phi ) |
Definition at line 297 of file bsdf_util.h.
References iridescence_lookup_sensitivity(), make_float3(), one_float3(), R, sqr(), and sqrtf.
Referenced by fresnel_iridescence().
| ccl_device_inline Spectrum iridescence_lookup_sensitivity | ( | float | OPD, |
| 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 284 of file bsdf_util.h.
References 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, |
| float3 | N ) |
Definition at line 221 of file bsdf_util.h.
References 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(), 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 72 of file bsdf_util.h.
References 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 | ( | float | u | ) |
Definition at line 117 of file bsdf_util.h.
References clamp().