* Small fix for a slowdown when rendering fully glossy (1.0)

reflecting/refracting materials with ray shadows. Fully glossy 
materials get Full OSA on automatically, so extra redundant samples 
were being calculated for the shadows. This has now been fixed by 
reducing the shadow samples accordingly if Full OSA is on.

Thanks to Benjamin Thery who notified me of this!
This commit is contained in:
Matt Ebb
2007-09-12 03:27:03 +00:00
parent f6aa903e10
commit cbee57342f

View File

@@ -1684,8 +1684,14 @@ static void ray_shadow_qmc(ShadeInput *shi, LampRen *lar, float *lampco, float *
shadfac[3]= 1.0f;
if (lar->ray_totsamp < 2) do_soft = 0;
if (do_soft) max_samples = lar->ray_totsamp;
else max_samples = (R.osa > 4)?R.osa:5;
if (shi->vlr->flag & R_FULL_OSA) {
if (do_soft) max_samples = max_samples/R.osa + 1;
else max_samples = 1;
} else {
if (do_soft) max_samples = lar->ray_totsamp;
else max_samples = (R.osa > 4)?R.osa:5;
}
/* sampling init */
if (lar->ray_samp_method==LA_SAMP_HALTON) {