diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-29 20:59:37 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-29 20:59:37 +0300 |
commit | e7915ea6eb6e86fb71f92333efc9ee069559e2b3 (patch) | |
tree | 66cf76721749794a6a7584937160fefdbb70f556 /intern/cycles/kernel/split/kernel_lamp_emission.h | |
parent | 25aea19323bbbdc4723891fab5e7cee7689c333d (diff) |
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.
Diffstat (limited to 'intern/cycles/kernel/split/kernel_lamp_emission.h')
-rw-r--r-- | intern/cycles/kernel/split/kernel_lamp_emission.h | 88 |
1 files changed, 0 insertions, 88 deletions
diff --git a/intern/cycles/kernel/split/kernel_lamp_emission.h b/intern/cycles/kernel/split/kernel_lamp_emission.h index 10372c5fc88..dc3b4b34d4e 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 } } |