Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2007-09-12 07:27:03 +0400
committerMatt Ebb <matt@mke3.net>2007-09-12 07:27:03 +0400
commitcbee57342f93387a1e30337673cf283f618c40d6 (patch)
tree8b032e4e091608b285a539671ec4be6724c4cf65 /source/blender/render
parentf6aa903e10ed4221118814f216eb724d893c1474 (diff)
* 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!
Diffstat (limited to 'source/blender/render')
-rw-r--r--source/blender/render/intern/source/rayshade.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/render/intern/source/rayshade.c b/source/blender/render/intern/source/rayshade.c
index 0e4c0bbcc45..40f5dcc54f6 100644
--- a/source/blender/render/intern/source/rayshade.c
+++ b/source/blender/render/intern/source/rayshade.c
@@ -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) {