Cycles: add rejection of inf/nan samples, in principle these should not happen
but this makes it more reliable for now. Also add an integrator "Clamp" option, to clamp very light samples to a maximum value. This will reduce accuracy but may help reducing noise and speed up convergence.
This commit is contained in:
@@ -396,6 +396,10 @@ __device float4 kernel_path_integrate(KernelGlobals *kg, RNG *rng, int sample, R
|
||||
|
||||
float3 L_sum = path_radiance_sum(&L);
|
||||
|
||||
#ifdef __CLAMP_SAMPLE__
|
||||
path_radiance_clamp(&L, &L_sum, kernel_data.integrator.sample_clamp);
|
||||
#endif
|
||||
|
||||
kernel_write_light_passes(kg, buffer, &L, sample);
|
||||
|
||||
return make_float4(L_sum.x, L_sum.y, L_sum.z, 1.0f - L_transparent);
|
||||
|
Reference in New Issue
Block a user