forked from bartvdbraak/blender
Workaround for T47213: branched path sampling issues with CUDA 7.5.
This commit is contained in:
parent
1d15421af9
commit
3c4f971392
@ -150,7 +150,7 @@ ccl_device void compute_light_pass(KernelGlobals *kg, ShaderData *sd, PathRadian
|
||||
#if defined(__EMISSION__)
|
||||
/* direct light */
|
||||
if(kernel_data.integrator.use_direct_light) {
|
||||
bool all = kernel_data.integrator.sample_all_lights_direct;
|
||||
int all = kernel_data.integrator.sample_all_lights_direct;
|
||||
kernel_branched_path_surface_connect_light(kg, &rng,
|
||||
sd, &state, throughput, 1.0f, &L_sample, all);
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
|
||||
VolumeIntegrateResult result = VOLUME_PATH_ATTENUATED;
|
||||
|
||||
if(volume_segment.closure_flag & SD_SCATTER) {
|
||||
bool all = kernel_data.integrator.sample_all_lights_indirect;
|
||||
int all = kernel_data.integrator.sample_all_lights_indirect;
|
||||
|
||||
/* direct light sampling */
|
||||
kernel_branched_path_volume_connect_light(kg,
|
||||
@ -374,7 +374,7 @@ ccl_device void kernel_path_indirect(KernelGlobals *kg,
|
||||
|
||||
#if defined(__EMISSION__) && defined(__BRANCHED_PATH__)
|
||||
if(kernel_data.integrator.use_direct_light) {
|
||||
bool all = kernel_data.integrator.sample_all_lights_indirect;
|
||||
int all = kernel_data.integrator.sample_all_lights_indirect;
|
||||
kernel_branched_path_surface_connect_light(kg,
|
||||
rng,
|
||||
&sd,
|
||||
@ -705,7 +705,7 @@ ccl_device_inline float4 kernel_path_integrate(KernelGlobals *kg,
|
||||
VolumeIntegrateResult result = VOLUME_PATH_ATTENUATED;
|
||||
|
||||
if(volume_segment.closure_flag & SD_SCATTER) {
|
||||
bool all = false;
|
||||
int all = false;
|
||||
|
||||
/* direct light sampling */
|
||||
kernel_branched_path_volume_connect_light(kg, rng, &volume_sd,
|
||||
|
@ -194,7 +194,7 @@ ccl_device void kernel_branched_path_subsurface_scatter(KernelGlobals *kg,
|
||||
#ifdef __EMISSION__
|
||||
/* direct light */
|
||||
if(kernel_data.integrator.use_direct_light) {
|
||||
bool all = kernel_data.integrator.sample_all_lights_direct;
|
||||
int all = kernel_data.integrator.sample_all_lights_direct;
|
||||
kernel_branched_path_surface_connect_light(
|
||||
kg,
|
||||
rng,
|
||||
@ -297,7 +297,7 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
|
||||
if(volume_segment.closure_flag & SD_SCATTER) {
|
||||
volume_segment.sampling_method = volume_stack_sampling_method(kg, state.volume_stack);
|
||||
|
||||
bool all = kernel_data.integrator.sample_all_lights_direct;
|
||||
int all = kernel_data.integrator.sample_all_lights_direct;
|
||||
|
||||
kernel_branched_path_volume_connect_light(kg, rng, &volume_sd,
|
||||
throughput, &state, &L, all, &volume_ray, &volume_segment);
|
||||
@ -517,7 +517,7 @@ ccl_device float4 kernel_branched_path_integrate(KernelGlobals *kg, RNG *rng, in
|
||||
#ifdef __EMISSION__
|
||||
/* direct light */
|
||||
if(kernel_data.integrator.use_direct_light) {
|
||||
bool all = kernel_data.integrator.sample_all_lights_direct;
|
||||
int all = kernel_data.integrator.sample_all_lights_direct;
|
||||
kernel_branched_path_surface_connect_light(kg, rng,
|
||||
&sd, &hit_state, throughput, 1.0f, &L, all);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* branched path tracing: connect path directly to position on one or more lights and add it to L */
|
||||
ccl_device_noinline void kernel_branched_path_surface_connect_light(KernelGlobals *kg, RNG *rng,
|
||||
ShaderData *sd, PathState *state, float3 throughput, float num_samples_adjust, PathRadiance *L, bool sample_all_lights)
|
||||
ShaderData *sd, PathState *state, float3 throughput, float num_samples_adjust, PathRadiance *L, int sample_all_lights)
|
||||
{
|
||||
#ifdef __EMISSION__
|
||||
/* sample illumination from lights to find path contribution */
|
||||
|
Loading…
Reference in New Issue
Block a user