forked from bartvdbraak/blender
Fix T50975: Cycles: Light sampling threshold inadvertently clamps negative lamps
This commit is contained in:
parent
6b86b446d3
commit
a201b99c5a
@ -157,7 +157,7 @@ ccl_device_noinline bool direct_emission(KernelGlobals *kg,
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if(kernel_data.integrator.light_inv_rr_threshold > 0.0f) {
|
if(kernel_data.integrator.light_inv_rr_threshold > 0.0f) {
|
||||||
float probability = max3(bsdf_eval_sum(eval)) * kernel_data.integrator.light_inv_rr_threshold;
|
float probability = max3(fabs(bsdf_eval_sum(eval))) * kernel_data.integrator.light_inv_rr_threshold;
|
||||||
if(probability < 1.0f) {
|
if(probability < 1.0f) {
|
||||||
if(rand_terminate >= probability) {
|
if(rand_terminate >= probability) {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user