Blender  V2.93
Classes | Typedefs | Functions
kernel_light.h File Reference
#include "kernel_light_background.h"

Go to the source code of this file.

Classes

struct  LightSample
 

Typedefs

typedef CCL_NAMESPACE_BEGIN struct LightSample LightSample
 

Functions

ccl_device_inline bool lamp_light_sample (KernelGlobals *kg, int lamp, float randu, float randv, float3 P, LightSample *ls)
 
ccl_device bool lamp_light_eval (KernelGlobals *kg, int lamp, float3 P, float3 D, float t, LightSample *ls)
 
ccl_device_inline bool triangle_world_space_vertices (KernelGlobals *kg, int object, int prim, float time, float3 V[3])
 
ccl_device_inline float triangle_light_pdf_area (KernelGlobals *kg, const float3 Ng, const float3 I, float t)
 
ccl_device_forceinline float triangle_light_pdf (KernelGlobals *kg, ShaderData *sd, float t)
 
ccl_device_forceinline void triangle_light_sample (KernelGlobals *kg, int prim, int object, float randu, float randv, float time, LightSample *ls, const float3 P)
 
ccl_device int light_distribution_sample (KernelGlobals *kg, float *randu)
 
ccl_device_inline bool light_select_reached_max_bounces (KernelGlobals *kg, int index, int bounce)
 
ccl_device_noinline bool light_sample (KernelGlobals *kg, int lamp, float randu, float randv, float time, float3 P, int bounce, LightSample *ls)
 
ccl_device_inline int light_select_num_samples (KernelGlobals *kg, int index)
 

Typedef Documentation

◆ LightSample

Function Documentation

◆ lamp_light_eval()

ccl_device bool lamp_light_eval ( KernelGlobals *  kg,
int  lamp,
float3  P,
float3  D,
float  t,
LightSample ls 
)

◆ lamp_light_sample()

ccl_device_inline bool lamp_light_sample ( KernelGlobals *  kg,
int  lamp,
float  randu,
float  randv,
float3  P,
LightSample ls 
)

◆ light_distribution_sample()

ccl_device int light_distribution_sample ( KernelGlobals *  kg,
float randu 
)

Definition at line 620 of file kernel_light.h.

References clamp(), kernel_data, kernel_tex_fetch, len, and r.

Referenced by light_sample().

◆ light_sample()

ccl_device_noinline bool light_sample ( KernelGlobals *  kg,
int  lamp,
float  randu,
float  randv,
float  time,
float3  P,
int  bounce,
LightSample ls 
)

◆ light_select_num_samples()

ccl_device_inline int light_select_num_samples ( KernelGlobals *  kg,
int  index 
)

Definition at line 700 of file kernel_light.h.

References kernel_tex_fetch.

◆ light_select_reached_max_bounces()

ccl_device_inline bool light_select_reached_max_bounces ( KernelGlobals *  kg,
int  index,
int  bounce 
)

Definition at line 658 of file kernel_light.h.

References kernel_tex_fetch.

Referenced by light_sample().

◆ triangle_light_pdf()

ccl_device_forceinline float triangle_light_pdf ( KernelGlobals *  kg,
ShaderData sd,
float  t 
)

◆ triangle_light_pdf_area()

ccl_device_inline float triangle_light_pdf_area ( KernelGlobals *  kg,
const float3  Ng,
const float3  I,
float  t 
)

Definition at line 368 of file kernel_light.h.

References dot(), fabsf, I, kernel_data, and t.

Referenced by triangle_light_pdf(), and triangle_light_sample().

◆ triangle_light_sample()

ccl_device_forceinline void triangle_light_sample ( KernelGlobals *  kg,
int  prim,
int  object,
float  randu,
float  randv,
float  time,
LightSample ls,
const float3  P 
)

◆ triangle_world_space_vertices()

ccl_device_inline bool triangle_world_space_vertices ( KernelGlobals *  kg,
int  object,
int  prim,
float  time,
float3  V[3] 
)