* 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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user