[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12018] trunk/blender/source/blender/ render/intern/source/rayshade.c: * Small fix for a slowdown when rendering fully glossy (1.0)

Matt Ebb matt at mke3.net
Wed Sep 12 05:27:31 CEST 2007


Revision: 12018
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12018
Author:   broken
Date:     2007-09-12 05:27:03 +0200 (Wed, 12 Sep 2007)

Log Message:
-----------
* 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!

Modified Paths:
--------------
    trunk/blender/source/blender/render/intern/source/rayshade.c

Modified: trunk/blender/source/blender/render/intern/source/rayshade.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/rayshade.c	2007-09-12 02:13:35 UTC (rev 12017)
+++ trunk/blender/source/blender/render/intern/source/rayshade.c	2007-09-12 03:27:03 UTC (rev 12018)
@@ -1684,8 +1684,14 @@
 		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) {





More information about the Bf-blender-cvs mailing list