Blender  V2.93
Classes | Macros | Typedefs | Enumerations | Functions
kernel_volume.h File Reference

Go to the source code of this file.

Classes

struct  VolumeShaderCoefficients
 

Macros

#define VOLUME_THROUGHPUT_EPSILON   1e-6f
 

Typedefs

typedef enum VolumeIntegrateResult VolumeIntegrateResult
 
typedef struct VolumeShaderCoefficients VolumeShaderCoefficients
 

Enumerations

enum  VolumeIntegrateResult { VOLUME_PATH_SCATTERED = 0 , VOLUME_PATH_ATTENUATED = 1 , VOLUME_PATH_MISSED = 2 }
 

Functions

ccl_device float3 volume_color_transmittance (float3 sigma, float t)
 
ccl_device float kernel_volume_channel_get (float3 value, int channel)
 
ccl_device float kernel_volume_equiangular_sample (Ray *ray, float3 light_P, float xi, float *pdf)
 
ccl_device float kernel_volume_equiangular_pdf (Ray *ray, float3 light_P, float sample_t)
 
ccl_device float kernel_volume_distance_sample (float max_t, float3 sigma_t, int channel, float xi, float3 *transmittance, float3 *pdf)
 
ccl_device float3 kernel_volume_distance_pdf (float max_t, float3 sigma_t, float sample_t)
 
ccl_device float3 kernel_volume_emission_integrate (VolumeShaderCoefficients *coeff, int closure_flag, float3 transmittance, float t)
 
ccl_device int kernel_volume_sample_channel (float3 albedo, float3 throughput, float rand, float3 *pdf)
 

Macro Definition Documentation

◆ VOLUME_THROUGHPUT_EPSILON

#define VOLUME_THROUGHPUT_EPSILON   1e-6f

Definition at line 23 of file kernel_volume.h.

Typedef Documentation

◆ VolumeIntegrateResult

◆ VolumeShaderCoefficients

Enumeration Type Documentation

◆ VolumeIntegrateResult

Enumerator
VOLUME_PATH_SCATTERED 
VOLUME_PATH_ATTENUATED 
VOLUME_PATH_MISSED 

Definition at line 27 of file kernel_volume.h.

Function Documentation

◆ kernel_volume_channel_get()

ccl_device float kernel_volume_channel_get ( float3  value,
int  channel 
)

Definition at line 107 of file kernel_volume.h.

References float3::x, float3::y, and float3::z.

Referenced by kernel_volume_distance_sample(), and subsurface_random_walk().

◆ kernel_volume_distance_pdf()

ccl_device float3 kernel_volume_distance_pdf ( float  max_t,
float3  sigma_t,
float  sample_t 
)

Definition at line 389 of file kernel_volume.h.

References one_float3(), safe_divide_color(), and volume_color_transmittance().

◆ kernel_volume_distance_sample()

ccl_device float kernel_volume_distance_sample ( float  max_t,
float3  sigma_t,
int  channel,
float  xi,
float3 transmittance,
float3 pdf 
)

◆ kernel_volume_emission_integrate()

ccl_device float3 kernel_volume_emission_integrate ( VolumeShaderCoefficients coeff,
int  closure_flag,
float3  transmittance,
float  t 
)

◆ kernel_volume_equiangular_pdf()

ccl_device float kernel_volume_equiangular_pdf ( Ray ray,
float3  light_P,
float  sample_t 
)

Definition at line 344 of file kernel_volume.h.

References atan2f, Ray::D, D(), dot(), len_squared(), Ray::P, safe_sqrtf(), Ray::t, t, and UNLIKELY.

◆ kernel_volume_equiangular_sample()

ccl_device float kernel_volume_equiangular_sample ( Ray ray,
float3  light_P,
float  xi,
float pdf 
)

Definition at line 322 of file kernel_volume.h.

References atan2f, Ray::D, D(), dot(), len_squared(), min, Ray::P, safe_sqrtf(), Ray::t, t, tanf, and UNLIKELY.

◆ kernel_volume_sample_channel()

ccl_device int kernel_volume_sample_channel ( float3  albedo,
float3  throughput,
float  rand,
float3 pdf 
)

Definition at line 425 of file kernel_volume.h.

References fabs(), make_float3, float3::x, float3::y, and float3::z.

Referenced by subsurface_random_walk().

◆ volume_color_transmittance()

ccl_device float3 volume_color_transmittance ( float3  sigma,
float  t 
)