Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Kottler <dev@samkottler.net>2020-07-25 22:20:41 +0300
committerSam Kottler <dev@samkottler.net>2020-07-25 22:20:41 +0300
commit3a476e7b71e0529118350690d980b70bd4d98938 (patch)
tree2d31a6c833aecd8f7339c44140840445ede39edd
parente636d7f7eb0ec5dbd8d84453b30e603e765b0378 (diff)
Fixed a couple of tests with volumes with light tree disabled.
-rw-r--r--build_files/build_environment/patches/cmakelists_tbb.txt2
-rw-r--r--intern/cycles/kernel/kernel_light.h2
-rw-r--r--intern/cycles/kernel/kernel_path_surface.h9
-rw-r--r--intern/cycles/kernel/kernel_path_volume.h5
m---------release/datafiles/locale0
m---------release/scripts/addons0
m---------release/scripts/addons_contrib0
m---------source/tools0
8 files changed, 10 insertions, 8 deletions
diff --git a/build_files/build_environment/patches/cmakelists_tbb.txt b/build_files/build_environment/patches/cmakelists_tbb.txt
index 7edf3aa2785..16ef161434c 100644
--- a/build_files/build_environment/patches/cmakelists_tbb.txt
+++ b/build_files/build_environment/patches/cmakelists_tbb.txt
@@ -148,7 +148,7 @@ if (TBB_BUILD_SHARED)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "-Wl,-version-script,${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
elseif(WIN32)
set_property(TARGET tbb APPEND PROPERTY LINK_FLAGS "/DEF:${CMAKE_CURRENT_BINARY_DIR}/tbb.def")
-
+
endif()
install(TARGETS tbb DESTINATION lib)
if(WIN32)
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index 41afe50b41a..2e2f7349d94 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -48,7 +48,7 @@ ccl_device void kernel_update_light_picking(KernelGlobals *kg,
Ray *ray)
{
if (ray) {
- sd->P_pick = ray->P + ray->D * ray->t;
+ sd->P_pick = sd->P; // ray->P + ray->D * ray->t;
sd->N_pick = -ray->D;
sd->t_pick = ray->t;
return;
diff --git a/intern/cycles/kernel/kernel_path_surface.h b/intern/cycles/kernel/kernel_path_surface.h
index 346328e4804..1e24f73dd5c 100644
--- a/intern/cycles/kernel/kernel_path_surface.h
+++ b/intern/cycles/kernel/kernel_path_surface.h
@@ -66,6 +66,7 @@ ccl_device void accum_light_tree_contribution(KernelGlobals *kg,
{
float3 P = sd->P_pick;
float3 N = sd->N_pick;
+ float t = sd->t_pick;
float time = sd->time;
int bounce = state->bounce;
@@ -101,7 +102,7 @@ ccl_device void accum_light_tree_contribution(KernelGlobals *kg,
* see comment in light_tree_sample() for this piece of code */
float sum = 0.0f;
for (int i = 0; i < num_emitters; ++i) {
- sum += calc_light_importance(kg, -1.0f, P, N, offset, i);
+ sum += calc_light_importance(kg, t, P, N, offset, i);
}
if (sum == 0.0f) {
@@ -115,7 +116,7 @@ ccl_device void accum_light_tree_contribution(KernelGlobals *kg,
float prob = 0.0f;
int light = num_emitters - 1;
for (int i = 1; i < num_emitters + 1; ++i) {
- prob = calc_light_importance(kg, -1.0f, P, N, offset, i - 1) * sum_inv;
+ prob = calc_light_importance(kg, t, P, N, offset, i - 1) * sum_inv;
cdf_R = cdf_L + prob;
if (randu < cdf_R) {
light = i - 1;
@@ -194,8 +195,8 @@ ccl_device void accum_light_tree_contribution(KernelGlobals *kg,
/* go down one of the child nodes */
/* evaluate the importance of each of the child nodes */
- float I_L = calc_node_importance(kg, -1.0f, P, N, child_offsetL);
- float I_R = calc_node_importance(kg, -1.0f, P, N, child_offsetR);
+ float I_L = calc_node_importance(kg, t, P, N, child_offsetL);
+ float I_R = calc_node_importance(kg, t, P, N, child_offsetR);
if ((I_L == 0.0f) && (I_R == 0.0f)) {
return;
diff --git a/intern/cycles/kernel/kernel_path_volume.h b/intern/cycles/kernel/kernel_path_volume.h
index 2a4e811417f..668172df42d 100644
--- a/intern/cycles/kernel/kernel_path_volume.h
+++ b/intern/cycles/kernel/kernel_path_volume.h
@@ -149,6 +149,7 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg,
{
# ifdef __EMISSION__
BsdfEval L_light ccl_optional_struct_init;
+
bool use_light_tree = kernel_data.integrator.use_light_tree;
int num_lights = 1;
if (sample_all_lights && !use_light_tree) {
@@ -213,8 +214,8 @@ ccl_device void kernel_branched_path_volume_connect_light(KernelGlobals *kg,
light_u,
light_v,
sd->time,
- ray->P + ray->D * ray->t,
- -ray->D,
+ sd->P_pick,
+ sd->N_pick,
ray->t,
state->bounce,
&ls);
diff --git a/release/datafiles/locale b/release/datafiles/locale
-Subproject f1ab6e28bf1626daf898fc65e144f1e4e4f2098
+Subproject 4af22e0492f401c609a0203cad1a9bc7fa00b86
diff --git a/release/scripts/addons b/release/scripts/addons
-Subproject f1f69a63e0fb0f3079a9895e34aa56ae9b07078
+Subproject 25b00a0a52c81408b9dc15ea320a79ee956b3c0
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
-Subproject 45aa940dabda64f7877c6d5dd843998a86f0a83
+Subproject f2f4a8b3bfa36ee49f7bdb3a1acb40ef4b39ee3
diff --git a/source/tools b/source/tools
-Subproject 5cf2fc3e5dc28025394b57d8743401295528f31
+Subproject 6a252de776d0b9dca3167c30a7621a4f1e9bc91