Blender V2.61 - r43446
Classes | Typedefs | Functions

kernel_light.h File Reference

Go to the source code of this file.

Classes

struct  LightSample

Typedefs

typedef CCL_NAMESPACE_BEGIN
struct LightSample 
LightSample

Functions

__device float3 disk_light_sample (float3 v, float randu, float randv)
__device float3 distant_light_sample (float3 D, float size, float randu, float randv)
__device float3 sphere_light_sample (float3 P, float3 center, float size, float randu, float randv)
__device float3 area_light_sample (float3 axisu, float3 axisv, float randu, float randv)
__device void regular_light_sample (KernelGlobals *kg, int point, float randu, float randv, float3 P, LightSample *ls)
__device float regular_light_pdf (KernelGlobals *kg, const float3 Ng, const float3 I, float t)
__device void triangle_light_sample (KernelGlobals *kg, int prim, int object, float randu, float randv, LightSample *ls)
__device float triangle_light_pdf (KernelGlobals *kg, const float3 Ng, const float3 I, float t)
__device int light_distribution_sample (KernelGlobals *kg, float randt)
__device void light_sample (KernelGlobals *kg, float randt, float randu, float randv, float3 P, LightSample *ls)
__device float light_sample_pdf (KernelGlobals *kg, LightSample *ls, float3 I, float t)
__device void light_select (KernelGlobals *kg, int index, float randu, float randv, float3 P, LightSample *ls)
__device float light_select_pdf (KernelGlobals *kg, LightSample *ls, float3 I, float t)

Typedef Documentation

typedef CCL_NAMESPACE_BEGIN struct LightSample LightSample

Function Documentation

__device float3 area_light_sample ( float3  axisu,
float3  axisv,
float  randu,
float  randv 
)

Definition at line 53 of file kernel_light.h.

Referenced by regular_light_sample().

__device float3 disk_light_sample ( float3  v,
float  randu,
float  randv 
)

Definition at line 33 of file kernel_light.h.

References make_orthonormals(), and to_unit_disk().

Referenced by distant_light_sample(), and sphere_light_sample().

__device float3 distant_light_sample ( float3  D,
float  size,
float  randu,
float  randv 
)

Definition at line 43 of file kernel_light.h.

References disk_light_sample(), and normalize().

Referenced by regular_light_sample().

__device int light_distribution_sample ( KernelGlobals *  kg,
float  randt 
)

Definition at line 165 of file kernel_light.h.

References kernel_assert, kernel_data, kernel_tex_fetch, len(), and max.

Referenced by light_sample().

__device void light_sample ( KernelGlobals *  kg,
float  randt,
float  randu,
float  randv,
float3  P,
LightSample ls 
)
__device float light_sample_pdf ( KernelGlobals *  kg,
LightSample ls,
float3  I,
float  t 
)

Definition at line 218 of file kernel_light.h.

References LightSample::Ng, LightSample::prim, regular_light_pdf(), and triangle_light_pdf().

Referenced by direct_emission().

__device void light_select ( KernelGlobals *  kg,
int  index,
float  randu,
float  randv,
float3  P,
LightSample ls 
)

Definition at line 230 of file kernel_light.h.

References regular_light_sample().

Referenced by direct_emission().

__device float light_select_pdf ( KernelGlobals *  kg,
LightSample ls,
float3  I,
float  t 
)

Definition at line 235 of file kernel_light.h.

References LightSample::Ng, and regular_light_pdf().

__device float regular_light_pdf ( KernelGlobals *  kg,
const float3  Ng,
const float3  I,
float  t 
)

Definition at line 115 of file kernel_light.h.

References dot(), FLT_MAX, and kernel_data.

Referenced by light_sample_pdf(), and light_select_pdf().

__device void regular_light_sample ( KernelGlobals *  kg,
int  point,
float  randu,
float  randv,
float3  P,
LightSample ls 
)
__device float3 sphere_light_sample ( float3  P,
float3  center,
float  size,
float  randu,
float  randv 
)

Definition at line 48 of file kernel_light.h.

References disk_light_sample(), normalize(), and size().

Referenced by regular_light_sample().

__device float triangle_light_pdf ( KernelGlobals *  kg,
const float3  Ng,
const float3  I,
float  t 
)

Definition at line 152 of file kernel_light.h.

References dot(), fabsf, and kernel_data.

Referenced by indirect_emission(), and light_sample_pdf().

__device void triangle_light_sample ( KernelGlobals *  kg,
int  prim,
int  object,
float  randu,
float  randv,
LightSample ls 
)