Commit: e7915ea6eb6e86fb71f92333efc9ee069559e2b3
Author: Sergey Sharybin
Date:   Fri Jan 29 18:59:37 2016 +0100
Branches: master
https://developer.blender.org/rBe7915ea6eb6e86fb71f92333efc9ee069559e2b3

Cycles: Remove code which was commented out for ages now

It was mainly unfinished code for volume in a split kernel which
should be done differently anyway to avoid such a code copy-paste.

The code didn't really work, so likely nobody will cry.

===================================================================

M       intern/cycles/kernel/kernels/opencl/kernel_shadow_blocked.cl
M       intern/cycles/kernel/split/kernel_lamp_emission.h

===================================================================

diff --git a/intern/cycles/kernel/kernels/opencl/kernel_shadow_blocked.cl 
b/intern/cycles/kernel/kernels/opencl/kernel_shadow_blocked.cl
index 0a4a872..edf76fb 100644
--- a/intern/cycles/kernel/kernels/opencl/kernel_shadow_blocked.cl
+++ b/intern/cycles/kernel/kernels/opencl/kernel_shadow_blocked.cl
@@ -27,15 +27,6 @@ __kernel void kernel_ocl_path_trace_shadow_blocked(
         ccl_global int *Queue_index,           /* Tracks the number of 
elements in each queue */
         int queuesize)                         /* Size (capacity) of each 
queue */
 {
-#if 0
-       /* We will make the Queue_index entries '0' in the next kernel. */
-       if(get_global_id(0) == 0 && get_global_id(1) == 0) {
-               /* We empty this queue here */
-               Queue_index[QUEUE_SHADOW_RAY_CAST_AO_RAYS] = 0;
-               Queue_index[QUEUE_SHADOW_RAY_CAST_DL_RAYS] = 0;
-       }
-#endif
-
        int lidx = get_local_id(1) * get_local_id(0) + get_local_id(0);
 
        ccl_local unsigned int ao_queue_length;
diff --git a/intern/cycles/kernel/split/kernel_lamp_emission.h 
b/intern/cycles/kernel/split/kernel_lamp_emission.h
index 10372c5..dc3b4b3 100644
--- a/intern/cycles/kernel/split/kernel_lamp_emission.h
+++ b/intern/cycles/kernel/split/kernel_lamp_emission.h
@@ -79,93 +79,5 @@ ccl_device void kernel_lamp_emission(
                        }
                }
 #endif  /* __LAMP_MIS__ */
-
-               /* __VOLUME__ feature is disabled */
-#if 0
-#ifdef __VOLUME__
-               /* volume attenuation, emission, scatter */
-               if(state->volume_stack[0].shader != SHADER_NONE) {
-                       Ray volume_ray = ray;
-                       volume_ray.t = (hit)? isect.t: FLT_MAX;
-
-                       bool heterogeneous = volume_stack_is_heterogeneous(kg, 
state->volume_stack);
-
-#ifdef __VOLUME_DECOUPLED__
-                       int sampling_method = volume_stack_sampling_method(kg, 
state->volume_stack);
-                       bool decoupled = kernel_volume_use_decoupled(kg, 
heterogeneous, true, sampling_method);
-
-                       if(decoupled) {
-                               /* cache steps along volume for repeated 
sampling */
-                               VolumeSegment volume_segment;
-                               ShaderData volume_sd;
-
-                               shader_setup_from_volume(kg, &volume_sd, 
&volume_ray);
-                               kernel_volume_decoupled_record(kg, state,
-                                       &volume_ray, &volume_sd, 
&volume_segment, heterogeneous);
-
-                               volume_segment.sampling_method = 
sampling_method;
-
-                               /* emission */
-                               if(volume_segment.closure_flag & SD_EMISSION)
-                                       path_radiance_accum_emission(&L, 
throughput, volume_segment.accum_emission, state->bounce);
-
-                               /* scattering */
-                               VolumeIntegrateResult result = 
VOLUME_PATH_ATTENUATED;
-
-                               if(volume_segment.closure_flag & SD_SCATTER) {
-                                       bool all = false;
-
-                                       /* direct light sampling */
-                                       
kernel_branched_path_volume_connect_light(kg, rng, &volume_sd,
-                                               throughput, state, &L, 1.0f, 
all, &volume_ray, &volume_segment);
-
-                                       /* indirect sample. if we use distance 
sampling and take just
-                                        * one sample for direct and indirect 
light, we could share
-                                        * this computation, but makes code a 
bit complex */
-                                       float rphase = 
path_state_rng_1D_for_decision(kg, rng, state, PRNG_PHASE);
-                                       float rscatter = 
path_state_rng_1D_for_decision(kg, rng, state, PRNG_SCATTER_DISTANCE);
-
-                                       result = 
kernel_volume_decoupled_scatter(kg,
-                                               state, &volume_ray, &volume_sd, 
&throughput,
-                                               rphase, rscatter, 
&volume_segment, NULL, true);
-                               }
-
-                               if(result != VOLUME_PATH_SCATTERED)
-                                       throughput *= 
volume_segment.accum_transmittance;
-
-                               /* free cached steps */
-                               kernel_volume_decoupled_free(kg, 
&volume_segment);
-
-                               if(result == VOLUME_PATH_SCATTERED) {
-                                       if(kernel_path_volume_bounce(kg, rng, 
&volume_sd, &throughput, state, &L, &ray))
-                                               continue;
-                                       else
-                                               break;
-                               }
-                       }
-                       else
-#endif  /* __VOLUME_DECOUPLED__ */
-                       {
-                               /* integrate along volume segment with distance 
sampling */
-                               ShaderData volume_sd;
-                               VolumeIntegrateResult result = 
kernel_volume_integrate(
-                                       kg, state, &volume_sd, &volume_ray, &L, 
&throughput, rng, heterogeneous);
-
-#ifdef __VOLUME_SCATTER__
-                               if(result == VOLUME_PATH_SCATTERED) {
-                                       /* direct lighting */
-                                       kernel_path_volume_connect_light(kg, 
rng, &volume_sd, throughput, state, &L);
-
-                                       /* indirect light bounce */
-                                       if(kernel_path_volume_bounce(kg, rng, 
&volume_sd, &throughput, state, &L, &ray))
-                                               continue;
-                                       else
-                                               break;
-                               }
-#endif  /* __VOLUME_SCATTER__ */
-                       }
-               }
-#endif  /* __VOLUME__ */
-#endif
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to