Blender V4.3
bsdf.h File Reference

Go to the source code of this file.

Functions

CCL_NAMESPACE_BEGIN ccl_device_inline float bsdf_get_specular_roughness_squared (ccl_private const ShaderClosure *sc)
 
ccl_device_inline float bsdf_get_roughness_pass_squared (ccl_private const ShaderClosure *sc)
 
ccl_device_inline float bump_shadowing_term (int shader_flag, float3 Ng, float3 N, float3 I)
 
ccl_device_inline float shift_cos_in (float cos_in, const float frequency_multiplier)
 
ccl_device_inline bool bsdf_is_transmission (ccl_private const ShaderClosure *sc, const float3 wo)
 
ccl_device_inline int bsdf_sample (KernelGlobals kg, ccl_private ShaderData *sd, ccl_private const ShaderClosure *sc, const int path_flag, const float3 rand, ccl_private Spectrum *eval, ccl_private float3 *wo, ccl_private float *pdf, ccl_private float2 *sampled_roughness, ccl_private float *eta)
 
ccl_device_inline void bsdf_roughness_eta (const KernelGlobals kg, ccl_private const ShaderClosure *sc, const float3 wo, ccl_private float2 *roughness, ccl_private float *eta)
 
ccl_device_inline int bsdf_label (const KernelGlobals kg, ccl_private const ShaderClosure *sc, const float3 wo)
 
ccl_device Spectrum bsdf_eval (KernelGlobals kg, ccl_private ShaderData *sd, ccl_private const ShaderClosure *sc, const float3 wo, ccl_private float *pdf)
 
ccl_device void bsdf_blur (KernelGlobals kg, ccl_private ShaderClosure *sc, float roughness)
 
ccl_device_inline Spectrum bsdf_albedo (KernelGlobals kg, ccl_private const ShaderData *sd, ccl_private const ShaderClosure *sc, const bool reflection, const bool transmission)
 

Function Documentation

◆ bsdf_albedo()

◆ bsdf_blur()

◆ bsdf_eval()

Definition at line 469 of file bsdf.h.

References bsdf_ashikhmin_shirley_eval(), bsdf_ashikhmin_velvet_eval(), bsdf_diffuse_eval(), bsdf_diffuse_toon_eval(), bsdf_glossy_toon_eval(), bsdf_hair_chiang_eval(), bsdf_hair_huang_eval(), bsdf_hair_reflection_eval(), bsdf_hair_transmission_eval(), bsdf_microfacet_beckmann_eval(), bsdf_microfacet_ggx_eval(), bsdf_oren_nayar_eval(), bsdf_ray_portal_eval(), bsdf_sheen_eval(), bsdf_translucent_eval(), bsdf_transparent_eval(), bump_shadowing_term(), CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID, CLOSURE_BSDF_ASHIKHMIN_VELVET_ID, CLOSURE_BSDF_DIFFUSE_ID, CLOSURE_BSDF_DIFFUSE_RAMP_ID, CLOSURE_BSDF_DIFFUSE_TOON_ID, CLOSURE_BSDF_GLOSSY_TOON_ID, CLOSURE_BSDF_HAIR_CHIANG_ID, CLOSURE_BSDF_HAIR_HUANG_ID, CLOSURE_BSDF_HAIR_REFLECTION_ID, CLOSURE_BSDF_HAIR_TRANSMISSION_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID, CLOSURE_BSDF_MICROFACET_GGX_ID, CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID, CLOSURE_BSDF_OREN_NAYAR_ID, CLOSURE_BSDF_PHONG_RAMP_ID, CLOSURE_BSDF_RAY_PORTAL_ID, CLOSURE_BSDF_SHEEN_ID, CLOSURE_BSDF_TRANSLUCENT_ID, CLOSURE_BSDF_TRANSPARENT_ID, CLOSURE_IS_BSDF_DIFFUSE, dot(), isequal(), kernel_assert, kernel_data_fetch, shift_cos_in(), and zero_spectrum.

Referenced by _surface_shader_bsdf_eval_mis(), integrate_surface_bsdf_bssrdf_bounce(), integrate_surface_direct_light(), surface_shader_bsdf_eval(), surface_shader_bsdf_eval_pdfs(), and surface_shader_bsdf_sample_closure().

◆ bsdf_get_roughness_pass_squared()

◆ bsdf_get_specular_roughness_squared()

◆ bsdf_is_transmission()

ccl_device_inline bool bsdf_is_transmission ( ccl_private const ShaderClosure * sc,
const float3 wo )

Definition at line 104 of file bsdf.h.

References dot().

Referenced by bsdf_label(), and bsdf_roughness_eta().

◆ bsdf_label()

◆ bsdf_roughness_eta()

◆ bsdf_sample()

ccl_device_inline int bsdf_sample ( KernelGlobals kg,
ccl_private ShaderData * sd,
ccl_private const ShaderClosure * sc,
const int path_flag,
const float3 rand,
ccl_private Spectrum * eval,
ccl_private float3 * wo,
ccl_private float * pdf,
ccl_private float2 * sampled_roughness,
ccl_private float * eta )

Definition at line 109 of file bsdf.h.

References bsdf_ashikhmin_shirley_sample(), bsdf_ashikhmin_velvet_sample(), bsdf_diffuse_sample(), bsdf_diffuse_toon_sample(), bsdf_get_specular_roughness_squared(), bsdf_glossy_toon_sample(), bsdf_hair_chiang_sample(), bsdf_hair_huang_sample(), bsdf_hair_reflection_sample(), bsdf_hair_transmission_sample(), bsdf_microfacet_beckmann_sample(), bsdf_microfacet_ggx_sample(), bsdf_oren_nayar_sample(), bsdf_sheen_sample(), bsdf_translucent_sample(), bsdf_transparent_sample(), bump_shadowing_term(), CLOSURE_BSDF_ASHIKHMIN_SHIRLEY_ID, CLOSURE_BSDF_ASHIKHMIN_VELVET_ID, CLOSURE_BSDF_DIFFUSE_ID, CLOSURE_BSDF_DIFFUSE_RAMP_ID, CLOSURE_BSDF_DIFFUSE_TOON_ID, CLOSURE_BSDF_GLOSSY_TOON_ID, CLOSURE_BSDF_HAIR_CHIANG_ID, CLOSURE_BSDF_HAIR_HUANG_ID, CLOSURE_BSDF_HAIR_REFLECTION_ID, CLOSURE_BSDF_HAIR_TRANSMISSION_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_GLASS_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_ID, CLOSURE_BSDF_MICROFACET_BECKMANN_REFRACTION_ID, CLOSURE_BSDF_MICROFACET_GGX_GLASS_ID, CLOSURE_BSDF_MICROFACET_GGX_ID, CLOSURE_BSDF_MICROFACET_GGX_REFRACTION_ID, CLOSURE_BSDF_OREN_NAYAR_ID, CLOSURE_BSDF_PHONG_RAMP_ID, CLOSURE_BSDF_RAY_PORTAL_ID, CLOSURE_BSDF_SHEEN_ID, CLOSURE_BSDF_TRANSLUCENT_ID, CLOSURE_BSDF_TRANSPARENT_ID, dot(), float3_to_float2(), isequal(), kernel_assert, kernel_data, kernel_data_fetch, label, LABEL_DIFFUSE, LABEL_NONE, LABEL_TRANSMIT, LABEL_TRANSMIT_TRANSPARENT, one_float2(), PRIMITIVE_CURVE, shift_cos_in(), zero_float2(), and zero_spectrum.

Referenced by surface_shader_bsdf_sample_closure().

◆ bump_shadowing_term()

ccl_device_inline float bump_shadowing_term ( int shader_flag,
float3 Ng,
float3 N,
float3 I )

Definition at line 64 of file bsdf.h.

References dot(), I, N, safe_divide(), SD_USE_BUMP_MAP_CORRECTION, and sqr().

Referenced by bsdf_eval(), and bsdf_sample().

◆ shift_cos_in()

ccl_device_inline float shift_cos_in ( float cos_in,
const float frequency_multiplier )

Definition at line 92 of file bsdf.h.

References cosf, fast_acosf(), max, and min.

Referenced by bsdf_eval(), and bsdf_sample().