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:
Brecht Van Lommel
2012-04-05 15:17:45 +00:00
parent 5d0bfc0325
commit 6e93e33294
8 changed files with 72 additions and 2 deletions

View File

@@ -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);