[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54324] trunk/blender/intern/cycles/kernel : Fix non-progressive lamps with multiple samples not giving correct intensity after
Brecht Van Lommel
brechtvanlommel at pandora.be
Tue Feb 5 14:33:24 CET 2013
Revision: 54324
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54324
Author: blendix
Date: 2013-02-05 13:33:24 +0000 (Tue, 05 Feb 2013)
Log Message:
-----------
Fix non-progressive lamps with multiple samples not giving correct intensity after
recent fix.
Modified Paths:
--------------
trunk/blender/intern/cycles/kernel/kernel_accumulate.h
trunk/blender/intern/cycles/kernel/kernel_path.h
Modified: trunk/blender/intern/cycles/kernel/kernel_accumulate.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_accumulate.h 2013-02-05 13:31:59 UTC (rev 54323)
+++ trunk/blender/intern/cycles/kernel/kernel_accumulate.h 2013-02-05 13:33:24 UTC (rev 54324)
@@ -220,7 +220,7 @@
#endif
}
-__device_inline void path_radiance_accum_light(PathRadiance *L, float3 throughput, BsdfEval *bsdf_eval, float3 shadow, int bounce, bool is_lamp)
+__device_inline void path_radiance_accum_light(PathRadiance *L, float3 throughput, BsdfEval *bsdf_eval, float3 shadow, float shadow_fac, int bounce, bool is_lamp)
{
#ifdef __PASSES__
if(L->use_light_pass) {
@@ -233,9 +233,9 @@
if(is_lamp) {
float3 sum = throughput*(bsdf_eval->diffuse + bsdf_eval->glossy + bsdf_eval->transmission);
- L->shadow.x += shadow.x;
- L->shadow.y += shadow.y;
- L->shadow.z += shadow.z;
+ L->shadow.x += shadow.x*shadow_fac;
+ L->shadow.y += shadow.y*shadow_fac;
+ L->shadow.z += shadow.z*shadow_fac;
L->shadow.w += average(sum);
}
}
Modified: trunk/blender/intern/cycles/kernel/kernel_path.h
===================================================================
--- trunk/blender/intern/cycles/kernel/kernel_path.h 2013-02-05 13:31:59 UTC (rev 54323)
+++ trunk/blender/intern/cycles/kernel/kernel_path.h 2013-02-05 13:33:24 UTC (rev 54324)
@@ -411,7 +411,7 @@
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- path_radiance_accum_light(&L, throughput, &L_light, shadow, state.bounce, is_lamp);
+ path_radiance_accum_light(&L, throughput, &L_light, shadow, 1.0f, state.bounce, is_lamp);
}
}
}
@@ -624,7 +624,7 @@
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- path_radiance_accum_light(L, throughput, &L_light, shadow, state.bounce, is_lamp);
+ path_radiance_accum_light(L, throughput, &L_light, shadow, 1.0f, state.bounce, is_lamp);
}
}
}
@@ -841,7 +841,7 @@
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- path_radiance_accum_light(&L, throughput*num_samples_inv, &L_light, shadow*num_samples_inv, state.bounce, is_lamp);
+ path_radiance_accum_light(&L, throughput*num_samples_inv, &L_light, shadow, num_samples_inv, state.bounce, is_lamp);
}
}
}
@@ -870,7 +870,7 @@
if(!shadow_blocked(kg, &state, &light_ray, &shadow)) {
/* accumulate */
- path_radiance_accum_light(&L, throughput*num_samples_inv, &L_light, shadow*num_samples_inv, state.bounce, is_lamp);
+ path_radiance_accum_light(&L, throughput*num_samples_inv, &L_light, shadow, num_samples_inv, state.bounce, is_lamp);
}
}
}
More information about the Bf-blender-cvs
mailing list