[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17172] branches/sim_physics/source/ blender/render/intern/source/volumetric.c: * Did some small tweaks to how density is used with light

Matt Ebb matt at mke3.net
Wed Oct 22 11:26:18 CEST 2008


Revision: 17172
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17172
Author:   broken
Date:     2008-10-22 11:26:18 +0200 (Wed, 22 Oct 2008)

Log Message:
-----------
* Did some small tweaks to how density is used with light 
cache - it makes some very good improvements clearing up artifacts:

http://mke3.net/blender/devel/rendering/volumetrics/vol_lc_fixed.jpg

Modified Paths:
--------------
    branches/sim_physics/source/blender/render/intern/source/volumetric.c

Modified: branches/sim_physics/source/blender/render/intern/source/volumetric.c
===================================================================
--- branches/sim_physics/source/blender/render/intern/source/volumetric.c	2008-10-22 08:21:43 UTC (rev 17171)
+++ branches/sim_physics/source/blender/render/intern/source/volumetric.c	2008-10-22 09:26:18 UTC (rev 17172)
@@ -468,9 +468,6 @@
 		lar= go->lampren;
 		if (lar) {
 			vol_shade_one_lamp(shi, co, lar, lacol, stepsize, density);
-			
-			VecMulf(lacol, density);
-		
 			VecAddf(col, col, lacol);
 		}
 	}
@@ -539,7 +536,8 @@
 					vol_get_precached_scattering_nearest(shi, scatter_col, step_mid);
 			} else
 				vol_get_scattering(shi, scatter_col, step_mid, stepsize, density);
-			
+						
+			VecMulf(scatter_col, density);
 			VecAddf(d_radiance, emit_col, scatter_col);
 			
 			/*   Lv += Tr * (Lve() + Ld) */





More information about the Bf-blender-cvs mailing list