Blender  V2.93
Classes | Typedefs | Functions | Variables
bsdf_microfacet.h File Reference

Go to the source code of this file.

Classes

struct  MicrofacetExtra
 
struct  MicrofacetBsdf
 

Typedefs

typedef ccl_addr_space struct MicrofacetBsdf MicrofacetBsdf
 

Functions

ccl_device_inline void microfacet_beckmann_sample_slopes (KernelGlobals *kg, const float cos_theta_i, const float sin_theta_i, float randu, float randv, float *slope_x, float *slope_y, float *G1i)
 
ccl_device_inline void microfacet_ggx_sample_slopes (const float cos_theta_i, const float sin_theta_i, float randu, float randv, float *slope_x, float *slope_y, float *G1i)
 
ccl_device_forceinline float3 microfacet_sample_stretched (KernelGlobals *kg, const float3 omega_i, const float alpha_x, const float alpha_y, const float randu, const float randv, bool beckmann, float *G1i)
 
ccl_device_forceinline float3 reflection_color (const MicrofacetBsdf *bsdf, float3 L, float3 H)
 
ccl_device_forceinline float D_GTR1 (float NdotH, float alpha)
 
ccl_device_forceinline void bsdf_microfacet_fresnel_color (const ShaderData *sd, MicrofacetBsdf *bsdf)
 
ccl_device int bsdf_microfacet_ggx_setup (MicrofacetBsdf *bsdf)
 
ccl_device int bsdf_microfacet_ggx_isotropic_setup (MicrofacetBsdf *bsdf)
 
ccl_device int bsdf_microfacet_ggx_fresnel_setup (MicrofacetBsdf *bsdf, const ShaderData *sd)
 
ccl_device int bsdf_microfacet_ggx_clearcoat_setup (MicrofacetBsdf *bsdf, const ShaderData *sd)
 
ccl_device bool bsdf_microfacet_merge (const ShaderClosure *a, const ShaderClosure *b)
 
ccl_device int bsdf_microfacet_ggx_refraction_setup (MicrofacetBsdf *bsdf)
 
ccl_device void bsdf_microfacet_ggx_blur (ShaderClosure *sc, float roughness)
 
ccl_device float3 bsdf_microfacet_ggx_eval_reflect (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device float3 bsdf_microfacet_ggx_eval_transmit (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device int bsdf_microfacet_ggx_sample (KernelGlobals *kg, 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_microfacet_beckmann_setup (MicrofacetBsdf *bsdf)
 
ccl_device int bsdf_microfacet_beckmann_isotropic_setup (MicrofacetBsdf *bsdf)
 
ccl_device int bsdf_microfacet_beckmann_refraction_setup (MicrofacetBsdf *bsdf)
 
ccl_device void bsdf_microfacet_beckmann_blur (ShaderClosure *sc, float roughness)
 
ccl_device_inline float bsdf_beckmann_G1 (float alpha, float cos_n)
 
ccl_device_inline float bsdf_beckmann_aniso_G1 (float alpha_x, float alpha_y, float cos_n, float cos_phi, float sin_phi)
 
ccl_device float3 bsdf_microfacet_beckmann_eval_reflect (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device float3 bsdf_microfacet_beckmann_eval_transmit (const ShaderClosure *sc, const float3 I, const float3 omega_in, float *pdf)
 
ccl_device int bsdf_microfacet_beckmann_sample (KernelGlobals *kg, 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 MicrofacetExtra MicrofacetExtra
 

Typedef Documentation

◆ MicrofacetBsdf

Function Documentation

◆ bsdf_beckmann_aniso_G1()

ccl_device_inline float bsdf_beckmann_aniso_G1 ( float  alpha_x,
float  alpha_y,
float  cos_n,
float  cos_phi,
float  sin_phi 
)

◆ bsdf_beckmann_G1()

ccl_device_inline float bsdf_beckmann_G1 ( float  alpha,
float  cos_n 
)

◆ bsdf_microfacet_beckmann_blur()

ccl_device void bsdf_microfacet_beckmann_blur ( ShaderClosure sc,
float  roughness 
)

Definition at line 816 of file bsdf_microfacet.h.

References MicrofacetBsdf::alpha_x, MicrofacetBsdf::alpha_y, fmaxf, and usdtokens::roughness().

Referenced by bsdf_blur().

◆ bsdf_microfacet_beckmann_eval_reflect()

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

◆ bsdf_microfacet_beckmann_eval_transmit()

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

◆ bsdf_microfacet_beckmann_isotropic_setup()

ccl_device int bsdf_microfacet_beckmann_isotropic_setup ( MicrofacetBsdf bsdf)

◆ bsdf_microfacet_beckmann_refraction_setup()

ccl_device int bsdf_microfacet_beckmann_refraction_setup ( MicrofacetBsdf bsdf)

◆ bsdf_microfacet_beckmann_sample()

ccl_device int bsdf_microfacet_beckmann_sample ( KernelGlobals *  kg,
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 
)

◆ bsdf_microfacet_beckmann_setup()

ccl_device int bsdf_microfacet_beckmann_setup ( MicrofacetBsdf bsdf)

◆ bsdf_microfacet_fresnel_color()

ccl_device_forceinline void bsdf_microfacet_fresnel_color ( const ShaderData sd,
MicrofacetBsdf bsdf 
)

◆ bsdf_microfacet_ggx_blur()

ccl_device void bsdf_microfacet_ggx_blur ( ShaderClosure sc,
float  roughness 
)

Definition at line 382 of file bsdf_microfacet.h.

References MicrofacetBsdf::alpha_x, MicrofacetBsdf::alpha_y, fmaxf, and usdtokens::roughness().

Referenced by bsdf_blur().

◆ bsdf_microfacet_ggx_clearcoat_setup()

ccl_device int bsdf_microfacet_ggx_clearcoat_setup ( MicrofacetBsdf bsdf,
const ShaderData sd 
)

◆ bsdf_microfacet_ggx_eval_reflect()

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

◆ bsdf_microfacet_ggx_eval_transmit()

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

◆ bsdf_microfacet_ggx_fresnel_setup()

ccl_device int bsdf_microfacet_ggx_fresnel_setup ( MicrofacetBsdf bsdf,
const ShaderData sd 
)

◆ bsdf_microfacet_ggx_isotropic_setup()

ccl_device int bsdf_microfacet_ggx_isotropic_setup ( MicrofacetBsdf bsdf)

◆ bsdf_microfacet_ggx_refraction_setup()

ccl_device int bsdf_microfacet_ggx_refraction_setup ( MicrofacetBsdf bsdf)

◆ bsdf_microfacet_ggx_sample()

ccl_device int bsdf_microfacet_ggx_sample ( KernelGlobals *  kg,
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 
)

◆ bsdf_microfacet_ggx_setup()

ccl_device int bsdf_microfacet_ggx_setup ( MicrofacetBsdf bsdf)

◆ bsdf_microfacet_merge()

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

◆ D_GTR1()

ccl_device_forceinline float D_GTR1 ( float  NdotH,
float  alpha 
)

Definition at line 269 of file bsdf_microfacet.h.

References alpha, logf, M_1_PI_F, M_PI_F, and t.

Referenced by bsdf_microfacet_ggx_eval_reflect(), and bsdf_microfacet_ggx_sample().

◆ microfacet_beckmann_sample_slopes()

ccl_device_inline void microfacet_beckmann_sample_slopes ( KernelGlobals *  kg,
const float  cos_theta_i,
const float  sin_theta_i,
float  randu,
float  randv,
float slope_x,
float slope_y,
float G1i 
)

◆ microfacet_ggx_sample_slopes()

ccl_device_inline void microfacet_ggx_sample_slopes ( const float  cos_theta_i,
const float  sin_theta_i,
float  randu,
float  randv,
float slope_x,
float slope_y,
float G1i 
)

Definition at line 143 of file bsdf_microfacet.h.

References A, B, cosf, D(), M_2PI_F, r, safe_sqrtf(), sinf, sqrtf, and z.

Referenced by microfacet_sample_stretched().

◆ microfacet_sample_stretched()

ccl_device_forceinline float3 microfacet_sample_stretched ( KernelGlobals *  kg,
const float3  omega_i,
const float  alpha_x,
const float  alpha_y,
const float  randu,
const float  randv,
bool  beckmann,
float G1i 
)

◆ reflection_color()

ccl_device_forceinline float3 reflection_color ( const MicrofacetBsdf bsdf,
float3  L,
float3  H 
)

Variable Documentation

◆ MicrofacetExtra