Blender V4.5
light.cpp File Reference
#include "device/device.h"
#include "scene/background.h"
#include "scene/film.h"
#include "scene/integrator.h"
#include "scene/light.h"
#include "scene/light_tree.h"
#include "scene/mesh.h"
#include "scene/object.h"
#include "scene/scene.h"
#include "scene/shader.h"
#include "scene/shader_graph.h"
#include "scene/shader_nodes.h"
#include "scene/stats.h"
#include "integrator/shader_eval.h"
#include "util/hash.h"
#include "util/log.h"
#include "util/path.h"
#include "util/progress.h"

Go to the source code of this file.

Classes

struct  LightTreeFlatten
 

Functions

static CCL_NAMESPACE_BEGIN void shade_background_pixels (Device *device, DeviceScene *dscene, const int width, const int height, vector< float3 > &pixels, Progress &progress)
 
 NODE_DEFINE (Light)
 
static uint light_object_shader_flags (Object *object)
 
static void light_tree_node_copy_to_device (KernelLightTreeNode &knode, const LightTreeNode &node, const int left_child, const int right_child)
 
static int light_tree_flatten (LightTreeFlatten &flatten, const LightTreeNode *node, KernelLightTreeNode *knodes, KernelLightTreeEmitter *kemitters, int &next_node_index)
 
static void light_tree_leaf_emitters_copy_and_flatten (LightTreeFlatten &flatten, const LightTreeNode &node, KernelLightTreeNode *knodes, KernelLightTreeEmitter *kemitters, int &next_node_index)
 
static void light_tree_emitters_copy_and_flatten (LightTreeFlatten &flatten, const LightTreeNode *node, KernelLightTreeNode *knodes, KernelLightTreeEmitter *kemitters, int &next_node_index)
 
static std::pair< int, LightTreeMeasurelight_tree_specialize_nodes_flatten (const LightTreeFlatten &flatten, LightTreeNode *node, const uint64_t light_link_mask, const int depth, vector< KernelLightTreeNode > &knodes, int &next_node_index, bool can_share=true)
 
static void background_cdf (int start, const int end, const int res_x, const int res_y, const vector< float3 > *pixels, float2 *cond_cdf)
 

Function Documentation

◆ background_cdf()

static void background_cdf ( int start,
const int end,
const int res_x,
const int res_y,
const vector< float3 > * pixels,
float2 * cond_cdf )
static

Definition at line 924 of file scene/light.cpp.

References average(), fabs(), M_PI_F, sin_theta(), sinf, float2::x, and float2::y.

◆ light_object_shader_flags()

◆ light_tree_emitters_copy_and_flatten()

static void light_tree_emitters_copy_and_flatten ( LightTreeFlatten & flatten,
const LightTreeNode * node,
KernelLightTreeNode * knodes,
KernelLightTreeEmitter * kemitters,
int & next_node_index )
static

◆ light_tree_flatten()

◆ light_tree_leaf_emitters_copy_and_flatten()

static void light_tree_leaf_emitters_copy_and_flatten ( LightTreeFlatten & flatten,
const LightTreeNode & node,
KernelLightTreeNode * knodes,
KernelLightTreeEmitter * kemitters,
int & next_node_index )
static

◆ light_tree_node_copy_to_device()

◆ light_tree_specialize_nodes_flatten()

◆ NODE_DEFINE()

◆ shade_background_pixels()

static CCL_NAMESPACE_BEGIN void shade_background_pixels ( Device * device,
DeviceScene * dscene,
const int width,
const int height,
vector< float3 > & pixels,
Progress & progress )
static