[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17188] branches/sim_physics/source/ blender/render/intern/source/volumetric.c: Just adding some temporary testing code to help try and find a bug.
Matt Ebb
matt at mke3.net
Thu Oct 23 03:14:32 CEST 2008
Revision: 17188
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17188
Author: broken
Date: 2008-10-23 03:14:30 +0200 (Thu, 23 Oct 2008)
Log Message:
-----------
Just adding some temporary testing code to help try and find a bug.
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 22:29:24 UTC (rev 17187)
+++ branches/sim_physics/source/blender/render/intern/source/volumetric.c 2008-10-23 01:14:30 UTC (rev 17188)
@@ -386,10 +386,14 @@
float shade_stepsize = vol_get_stepsize(shi, STEPSIZE_SHADE);
float shadfac[4];
+ if (G.rt==5) printf("s_o_l pre checks col %f %f %f \n", lacol[0], lacol[1], lacol[2]);
+
if (lar->mode & LA_LAYER) if((lar->lay & shi->obi->lay)==0) return;
if ((lar->lay & shi->lay)==0) return;
if (lar->energy == 0.0) return;
+ if (G.rt==5) printf("s_o_l post checks col %f %f %f \n", lacol[0], lacol[1], lacol[2]);
+
visifac= lamp_get_visibility(lar, co, lv, &lampdist);
if(visifac==0.0f) return;
@@ -397,6 +401,8 @@
lacol[1] = lar->g;
lacol[2] = lar->b;
+ if (G.rt==5) printf("s_o_l post lacol col %f %f %f \n", lacol[0], lacol[1], lacol[2]);
+
if(lar->mode & LA_TEXTURE) {
shi->osatex= 0;
do_lamp_tex(lar, lv, shi, lacol, LA_TEXTURE);
@@ -404,6 +410,8 @@
VecMulf(lacol, visifac*lar->energy);
+ if (G.rt==5) printf("s_o_l post energy col %f %f %f \n", lacol[0], lacol[1], lacol[2]);
+
if (ELEM(lar->type, LA_SUN, LA_HEMI))
VECCOPY(lv, lar->vec);
VecMulf(lv, -1.0f);
@@ -414,6 +422,8 @@
if (shi->mat->vol_shadeflag & MA_VOL_ATTENUATED) {
Isect is;
+ if (G.rt==5) printf("s_o_l inside atten col %f %f %f \n", lacol[0], lacol[1], lacol[2]);
+
/* find minimum of volume bounds, or lamp coord */
if (vol_get_bounds(shi, co, lv, hitco, &is, VOL_BOUNDS_SS, 0)) {
float dist = VecLenf(co, hitco);
@@ -446,6 +456,8 @@
}
}
+ if (G.rt==5) printf("s_o_l post atten col %f %f %f \n", lacol[0], lacol[1], lacol[2]);
+
vol_get_scattering_fac(shi, &scatter_fac, co, density);
VecMulf(lacol, scatter_fac);
}
@@ -459,16 +471,21 @@
float col[3] = {0.f, 0.f, 0.f};
int i=0;
+ if (G.rt==5) printf("lights count: %d \n", BLI_countlist(&R.lights));
+
for(go=R.lights.first; go; go= go->next)
{
float lacol[3] = {0.f, 0.f, 0.f};
i++;
+ if (G.rt==5) printf("pre light %d \n", i);
lar= go->lampren;
if (lar) {
+ if (G.rt==5) printf("pre vol_shade_one_lamp %d col %f %f %f \n", i, lacol[0], lacol[1], lacol[2]);
vol_shade_one_lamp(shi, co, lar, lacol, stepsize, density);
VecAddf(col, col, lacol);
+ if (G.rt==5) printf("post vol_shade_one_lamp %d col %f %f %f \n", i, lacol[0], lacol[1], lacol[2]);
}
}
More information about the Bf-blender-cvs
mailing list