|
Blender V5.3
|
#include "kernel/types.h"#include "kernel/closure/bsdf_diffuse.h"#include "kernel/sample/mapping.h"Go to the source code of this file.
Classes | |
| struct | OrenNayarParam |
| struct | OrenNayarBsdf |
Functions | |
| ccl_device_forceinline bool | diffuse_roughness_is_almost_zero (const float alpha) |
| ccl_device_inline float | bsdf_oren_nayar_G (const float cosTheta) |
| ccl_device Spectrum | bsdf_oren_nayar_get_intensity (const ccl_private OrenNayarBsdf *bsdf, const float3 n, const float3 v, const float3 l) |
| ccl_device_inline OrenNayarParam | bsdf_oren_nayar_param (const Spectrum color, const float nv, const float roughness) |
| ccl_device void | bsdf_oren_nayar_setup (ccl_private ShaderData *sd, const float3 N, const Spectrum weight, const float roughness, const Spectrum color) |
| ccl_device Spectrum | bsdf_oren_nayar_eval (const ccl_private ShaderClosure *sc, const float3 wi, const float3 wo, ccl_private float *pdf) |
| ccl_device int | bsdf_oren_nayar_sample (const ccl_private ShaderClosure *sc, const float3 Ng, const float3 wi, const float2 rand, ccl_private Spectrum *eval, ccl_private float3 *wo, ccl_private float *pdf, ccl_private float2 *sampled_roughness, ccl_private float *eta) |
Subsurface in thin-walled mode | |
An infinitesimally thin sheet of dense scattering material, following OpenPBR spec https://academysoftwarefoundation.github.io/OpenPBR/#model/thin-walledcase It is approximated by a diffuse lobe and a translucent lobe, the respective weights of both lobes are given by subsurface anisotropy, with specifies the relative amount of backward and forward scattering. | |
| ccl_device_inline void | bsdf_thin_subsurface_setup (ccl_private ShaderData *sd, const float3 N, const Spectrum weight, const float anisotropy, const float roughness, const Spectrum color) |
| ccl_device int | bsdf_rough_translucent_sample (const ccl_private ShaderClosure *sc, const float3 Ng, const float3 wi, const float2 rand, ccl_private Spectrum *eval, ccl_private float3 *wo, ccl_private float *pdf, ccl_private float2 *sampled_roughness, ccl_private float *eta) |
| ccl_device Spectrum | bsdf_rough_translucent_eval (const ccl_private ShaderClosure *sc, const float3 wi, const float3 wo, ccl_private float *pdf) |
| ccl_device Spectrum bsdf_oren_nayar_eval | ( | const ccl_private ShaderClosure * | sc, |
| const float3 | wi, | ||
| const float3 | wo, | ||
| ccl_private float * | pdf ) |
Definition at line 114 of file bsdf_oren_nayar.h.
References bsdf_oren_nayar_eval(), bsdf_oren_nayar_get_intensity(), ccl_device, ccl_private, dot(), M_1_PI_F, and zero_spectrum.
Referenced by bsdf_eval(), bsdf_oren_nayar_eval(), and bsdf_rough_translucent_eval().
| ccl_device_inline float bsdf_oren_nayar_G | ( | const float | cosTheta | ) |
Definition at line 40 of file bsdf_oren_nayar.h.
References bsdf_oren_nayar_G(), ccl_device_inline, M_PI_2_F, safe_acosf(), sin_from_cos(), and sqr.
Referenced by bsdf_oren_nayar_G(), bsdf_oren_nayar_get_intensity(), and bsdf_oren_nayar_param().
| ccl_device Spectrum bsdf_oren_nayar_get_intensity | ( | const ccl_private OrenNayarBsdf * | bsdf, |
| const float3 | n, | ||
| const float3 | v, | ||
| const float3 | l ) |
Definition at line 52 of file bsdf_oren_nayar.h.
References OrenNayarParam::a, OrenNayarParam::b, bsdf_oren_nayar_G(), bsdf_oren_nayar_get_intensity(), ccl_device, ccl_private, dot(), FLT_MIN, M_1_PI_F, M_PI_F, make_spectrum, max, and OrenNayarParam::multiscatter_term.
Referenced by bsdf_oren_nayar_eval(), bsdf_oren_nayar_get_intensity(), and bsdf_oren_nayar_sample().
| ccl_device_inline OrenNayarParam bsdf_oren_nayar_param | ( | const Spectrum | color, |
| const float | nv, | ||
| const float | roughness ) |
Definition at line 77 of file bsdf_oren_nayar.h.
References b, bsdf_oren_nayar_G(), bsdf_oren_nayar_param(), ccl_device_inline, M_1_PI_F, M_2PI_F, M_PI_2_F, M_PI_F, max, one_spectrum, saturate, and saturatef.
Referenced by bsdf_oren_nayar_param(), bsdf_oren_nayar_setup(), and bsdf_thin_subsurface_setup().
| ccl_device int bsdf_oren_nayar_sample | ( | const ccl_private ShaderClosure * | sc, |
| const float3 | Ng, | ||
| const float3 | wi, | ||
| const float2 | 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 129 of file bsdf_oren_nayar.h.
References bsdf_oren_nayar_get_intensity(), bsdf_oren_nayar_sample(), ccl_device, ccl_private, dot(), LABEL_DIFFUSE, LABEL_REFLECT, one_float2(), sample_cos_hemisphere(), and zero_spectrum.
Referenced by bsdf_oren_nayar_sample(), bsdf_rough_translucent_sample(), and bsdf_sample().
| ccl_device void bsdf_oren_nayar_setup | ( | ccl_private ShaderData * | sd, |
| const float3 | N, | ||
| const Spectrum | weight, | ||
| const float | roughness, | ||
| const Spectrum | color ) |
Definition at line 98 of file bsdf_oren_nayar.h.
References bsdf_alloc(), bsdf_oren_nayar_param(), bsdf_oren_nayar_setup(), ccl_device, ccl_private, CLOSURE_BSDF_OREN_NAYAR_ID, dot(), N, SR_BSDF, and SR_BSDF_HAS_EVAL.
Referenced by bsdf_oren_nayar_setup(), osl_closure_oren_nayar_diffuse_bsdf_setup(), osl_closure_oren_nayar_setup(), and svm_node_closure_bsdf().
| ccl_device Spectrum bsdf_rough_translucent_eval | ( | const ccl_private ShaderClosure * | sc, |
| const float3 | wi, | ||
| const float3 | wo, | ||
| ccl_private float * | pdf ) |
Definition at line 233 of file bsdf_oren_nayar.h.
References bsdf_oren_nayar_eval(), bsdf_rough_translucent_eval(), ccl_device, ccl_private, and reflect.
Referenced by bsdf_eval(), and bsdf_rough_translucent_eval().
| ccl_device int bsdf_rough_translucent_sample | ( | const ccl_private ShaderClosure * | sc, |
| const float3 | Ng, | ||
| const float3 | wi, | ||
| const float2 | 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 219 of file bsdf_oren_nayar.h.
References bsdf_oren_nayar_sample(), bsdf_rough_translucent_sample(), ccl_device, ccl_private, LABEL_DIFFUSE, LABEL_TRANSMIT, and reflect.
Referenced by bsdf_rough_translucent_sample(), and bsdf_sample().
| ccl_device_inline void bsdf_thin_subsurface_setup | ( | ccl_private ShaderData * | sd, |
| const float3 | N, | ||
| const Spectrum | weight, | ||
| const float | anisotropy, | ||
| const float | roughness, | ||
| const Spectrum | color ) |
Definition at line 169 of file bsdf_oren_nayar.h.
References bsdf_alloc(), bsdf_diffuse_setup(), bsdf_oren_nayar_param(), bsdf_thin_subsurface_setup(), bsdf_translucent_setup(), ccl_device_inline, ccl_private, CLOSURE_BSDF_OREN_NAYAR_ID, CLOSURE_BSDF_ROUGH_TRANSLUCENT_ID, diffuse_roughness_is_almost_zero(), dot(), is_zero(), N, saturatef, SR_BSDF, SR_BSDF_HAS_EVAL, and SR_BSDF_HAS_TRANSMISSION.
Referenced by bsdf_thin_subsurface_setup(), osl_closure_thin_subsurface_setup(), and svm_node_closure_bsdf().
| ccl_device_forceinline bool diffuse_roughness_is_almost_zero | ( | const float | alpha | ) |
Definition at line 35 of file bsdf_oren_nayar.h.
References ccl_device_forceinline, and diffuse_roughness_is_almost_zero().
Referenced by bsdf_thin_subsurface_setup(), diffuse_roughness_is_almost_zero(), and svm_node_closure_bsdf().