Blender  V2.93
Classes | Functions | Variables
bsdf_diffuse.h File Reference

Go to the source code of this file.

Classes

struct  DiffuseBsdf
 

Functions

ccl_device int bsdf_diffuse_setup (DiffuseBsdf *bsdf)
 
ccl_device bool bsdf_diffuse_merge (const ShaderClosure *a, const ShaderClosure *b)
 
ccl_device float3 bsdf_diffuse_eval_reflect (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device float3 bsdf_diffuse_eval_transmit (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device int bsdf_diffuse_sample (const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
 
ccl_device int bsdf_translucent_setup (DiffuseBsdf *bsdf)
 
ccl_device float3 bsdf_translucent_eval_reflect (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device float3 bsdf_translucent_eval_transmit (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device int bsdf_translucent_sample (const ShaderClosure *sc, float3 Ng, float3 I, float3 dIdx, float3 dIdy, float randu, float randv, float3 *eval, float3 *omega_in, float3 *domega_in_dx, float3 *domega_in_dy, float *pdf)
 

Variables

CCL_NAMESPACE_BEGIN typedef ccl_addr_space struct DiffuseBsdf DiffuseBsdf
 

Function Documentation

◆ bsdf_diffuse_eval_reflect()

ccl_device float3 bsdf_diffuse_eval_reflect ( const ShaderClosure sc,
const float3  I,
const float3  omega_in,
float pdf 
)

Definition at line 60 of file bsdf_diffuse.h.

References dot(), fmaxf, M_1_PI_F, make_float3, and N.

Referenced by bsdf_eval().

◆ bsdf_diffuse_eval_transmit()

ccl_device float3 bsdf_diffuse_eval_transmit ( const ShaderClosure sc,
const float3  I,
const float3  omega_in,
float pdf 
)

Definition at line 73 of file bsdf_diffuse.h.

References make_float3.

Referenced by bsdf_eval().

◆ bsdf_diffuse_merge()

ccl_device bool bsdf_diffuse_merge ( const ShaderClosure a,
const ShaderClosure b 
)

Definition at line 52 of file bsdf_diffuse.h.

References Freestyle::a, and isequal_float3().

Referenced by bsdf_merge().

◆ bsdf_diffuse_sample()

ccl_device int bsdf_diffuse_sample ( const ShaderClosure sc,
float3  Ng,
float3  I,
float3  dIdx,
float3  dIdy,
float  randu,
float  randv,
float3 eval,
float3 omega_in,
float3 domega_in_dx,
float3 domega_in_dy,
float pdf 
)

Definition at line 81 of file bsdf_diffuse.h.

References dot(), LABEL_DIFFUSE, LABEL_REFLECT, make_float3, N, and sample_cos_hemisphere().

Referenced by bsdf_sample().

◆ bsdf_diffuse_setup()

ccl_device int bsdf_diffuse_setup ( DiffuseBsdf bsdf)

◆ bsdf_translucent_eval_reflect()

ccl_device float3 bsdf_translucent_eval_reflect ( const ShaderClosure sc,
const float3  I,
const float3  omega_in,
float pdf 
)

Definition at line 122 of file bsdf_diffuse.h.

References make_float3.

Referenced by bsdf_eval().

◆ bsdf_translucent_eval_transmit()

ccl_device float3 bsdf_translucent_eval_transmit ( const ShaderClosure sc,
const float3  I,
const float3  omega_in,
float pdf 
)

Definition at line 130 of file bsdf_diffuse.h.

References dot(), fmaxf, M_1_PI_F, make_float3, and N.

Referenced by bsdf_eval().

◆ bsdf_translucent_sample()

ccl_device int bsdf_translucent_sample ( const ShaderClosure sc,
float3  Ng,
float3  I,
float3  dIdx,
float3  dIdy,
float  randu,
float  randv,
float3 eval,
float3 omega_in,
float3 domega_in_dx,
float3 domega_in_dy,
float pdf 
)

Definition at line 143 of file bsdf_diffuse.h.

References dot(), LABEL_DIFFUSE, LABEL_TRANSMIT, make_float3, N, and sample_cos_hemisphere().

Referenced by bsdf_sample().

◆ bsdf_translucent_setup()

ccl_device int bsdf_translucent_setup ( DiffuseBsdf bsdf)

Definition at line 116 of file bsdf_diffuse.h.

References CLOSURE_BSDF_TRANSLUCENT_ID, SD_BSDF, and SD_BSDF_HAS_EVAL.

Referenced by svm_node_closure_bsdf().

Variable Documentation

◆ DiffuseBsdf