[Bf-blender-cvs] [d78b6bcc44] temp-cycles-denoising: Cycles Denoising: Remove old shadow estimation kernel code
Lukas Stockner
noreply at git.blender.org
Mon Feb 13 02:05:54 CET 2017
Commit: d78b6bcc44f21bdc82cd6d5deead972a8d1a9c6b
Author: Lukas Stockner
Date: Sun Feb 12 03:16:01 2017 +0100
Branches: temp-cycles-denoising
https://developer.blender.org/rBd78b6bcc44f21bdc82cd6d5deead972a8d1a9c6b
Cycles Denoising: Remove old shadow estimation kernel code
===================================================================
M intern/cycles/kernel/kernel_bake.h
M intern/cycles/kernel/kernel_path.h
M intern/cycles/kernel/kernel_path_surface.h
===================================================================
diff --git a/intern/cycles/kernel/kernel_bake.h b/intern/cycles/kernel/kernel_bake.h
index bcd759e53e..5bcc57cdcd 100644
--- a/intern/cycles/kernel/kernel_bake.h
+++ b/intern/cycles/kernel/kernel_bake.h
@@ -115,7 +115,7 @@ ccl_device_inline void compute_light_pass(KernelGlobals *kg,
/* sample light and BSDF */
if(!is_sss_sample && (pass_filter & (BAKE_FILTER_DIRECT | BAKE_FILTER_INDIRECT))) {
- kernel_path_surface_connect_light(kg, &rng, sd, &emission_sd, throughput, &state, &L_sample, NULL);
+ kernel_path_surface_connect_light(kg, &rng, sd, &emission_sd, throughput, &state, &L_sample);
if(kernel_path_surface_bounce(kg, &rng, sd, &throughput, &state, &L_sample, &ray)) {
#ifdef __LAMP_MIS__
diff --git a/intern/cycles/kernel/kernel_path.h b/intern/cycles/kernel/kernel_path.h
index eada6916e5..8f2c8cfb5e 100644
--- a/intern/cycles/kernel/kernel_path.h
+++ b/intern/cycles/kernel/kernel_path.h
@@ -491,7 +491,7 @@ bool kernel_path_subsurface_scatter(
hit_L->direct_throughput = L->direct_throughput;
path_radiance_copy_indirect(hit_L, L);
- kernel_path_surface_connect_light(kg, rng, sd, emission_sd, *hit_tp, state, hit_L, NULL);
+ kernel_path_surface_connect_light(kg, rng, sd, emission_sd, *hit_tp, state, hit_L);
if(kernel_path_surface_bounce(kg,
rng,
@@ -885,10 +885,7 @@ ccl_device_inline float kernel_path_integrate(KernelGlobals *kg,
#endif /* __SUBSURFACE__ */
/* direct lighting */
- float2 shadow_info = make_float2(0.0f, 0.0f);
- kernel_path_surface_connect_light(kg, rng, &sd, &emission_sd, throughput, &state, L, &shadow_info);
- if(write_denoising_shadow)
- kernel_write_denoising_shadow(kg, buffer, sample, shadow_info);
+ kernel_path_surface_connect_light(kg, rng, &sd, &emission_sd, throughput, &state, &L);
/* compute direct lighting and next bounce */
if(!kernel_path_surface_bounce(kg, rng, &sd, &throughput, &state, L, &ray))
diff --git a/intern/cycles/kernel/kernel_path_surface.h b/intern/cycles/kernel/kernel_path_surface.h
index effaee32ed..fea503d06e 100644
--- a/intern/cycles/kernel/kernel_path_surface.h
+++ b/intern/cycles/kernel/kernel_path_surface.h
@@ -192,7 +192,7 @@ ccl_device bool kernel_branched_path_surface_bounce(KernelGlobals *kg, RNG *rng,
/* path tracing: connect path directly to position on a light and add it to L */
ccl_device_inline void kernel_path_surface_connect_light(KernelGlobals *kg, ccl_addr_space RNG *rng,
ShaderData *sd, ShaderData *emission_sd, float3 throughput, ccl_addr_space PathState *state,
- PathRadiance *L, float2 *shadow_info)
+ PathRadiance *L)
{
#ifdef __EMISSION__
if(!(kernel_data.integrator.use_direct_light && (ccl_fetch(sd, flag) & SD_BSDF_HAS_EVAL)))
@@ -217,19 +217,12 @@ ccl_device_inline void kernel_path_surface_connect_light(KernelGlobals *kg, ccl_
if(direct_emission(kg, sd, emission_sd, &ls, state, &light_ray, &L_light, &is_lamp, terminate)) {
/* trace shadow ray */
float3 shadow;
- float3 light_unoccluded;
- if(shadow_info) {
- light_unoccluded = throughput * bsdf_eval_sum(&L_light);
- shadow_info->x = average(light_unoccluded);
- }
if(!shadow_blocked(kg, emission_sd, state, &light_ray, &shadow)) {
/* accumulate */
path_radiance_accum_light(L, throughput, &L_light, shadow, 1.0f, state->bounce, is_lamp);
- if(shadow_info) shadow_info->y = average(light_unoccluded*shadow);
}
}
- else if(shadow_info) shadow_info->y = 0.0f;
}
#endif
}
More information about the Bf-blender-cvs
mailing list