Merge branch 'blender-v3.5-release'
This commit is contained in:
commit
7fe42ea566
@ -349,8 +349,7 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
|
||||
|
||||
bool use_light_tree = get_boolean(cscene, "use_light_tree");
|
||||
integrator->set_use_light_tree(use_light_tree);
|
||||
integrator->set_light_sampling_threshold(
|
||||
(use_light_tree) ? 0.0f : get_float(cscene, "light_sampling_threshold"));
|
||||
integrator->set_light_sampling_threshold(get_float(cscene, "light_sampling_threshold"));
|
||||
|
||||
if (integrator->use_light_tree_is_modified()) {
|
||||
scene->light_manager->tag_update(scene, LightManager::UPDATE_ALL);
|
||||
|
@ -113,13 +113,16 @@ ccl_device_noinline bool light_sample(KernelGlobals kg,
|
||||
{
|
||||
int prim;
|
||||
MeshLight mesh_light;
|
||||
#ifdef __LIGHT_TREE__
|
||||
if (kernel_data.integrator.use_light_tree) {
|
||||
ccl_global const KernelLightTreeEmitter *kemitter = &kernel_data_fetch(light_tree_emitters,
|
||||
emitter_index);
|
||||
prim = kemitter->prim;
|
||||
mesh_light = kemitter->mesh_light;
|
||||
}
|
||||
else {
|
||||
else
|
||||
#endif
|
||||
{
|
||||
ccl_global const KernelLightDistribution *kdistribution = &kernel_data_fetch(
|
||||
light_distribution, emitter_index);
|
||||
prim = kdistribution->prim;
|
||||
|
@ -255,8 +255,10 @@ void Integrator::device_update(Device *device, DeviceScene *dscene, Scene *scene
|
||||
kintegrator->scrambling_distance = scrambling_distance;
|
||||
kintegrator->sobol_index_mask = reverse_integer_bits(next_power_of_two(aa_samples - 1) - 1);
|
||||
|
||||
kintegrator->use_light_tree = scene->integrator->use_light_tree;
|
||||
if (light_sampling_threshold > 0.0f) {
|
||||
/* NOTE: The kintegrator->use_light_tree is assigned to the efficient value in the light manager,
|
||||
* and the synchronization code is expected to tag the light manager for update when the
|
||||
* `use_light_tree` is changed. */
|
||||
if (light_sampling_threshold > 0.0f && !kintegrator->use_light_tree) {
|
||||
kintegrator->light_inv_rr_threshold = scene->film->get_exposure() / light_sampling_threshold;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user