[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [27240] branches/render25/source/blender/ render/intern/source: Render Branch: fix problem in lamp shadow cache code, remove debug print.
Brecht Van Lommel
brecht at blender.org
Wed Mar 3 11:17:22 CET 2010
Revision: 27240
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=27240
Author: blendix
Date: 2010-03-03 11:17:22 +0100 (Wed, 03 Mar 2010)
Log Message:
-----------
Render Branch: fix problem in lamp shadow cache code, remove debug print.
Modified Paths:
--------------
branches/render25/source/blender/render/intern/source/lamp.c
branches/render25/source/blender/render/intern/source/rayshade.c
Modified: branches/render25/source/blender/render/intern/source/lamp.c
===================================================================
--- branches/render25/source/blender/render/intern/source/lamp.c 2010-03-03 08:56:48 UTC (rev 27239)
+++ branches/render25/source/blender/render/intern/source/lamp.c 2010-03-03 10:17:22 UTC (rev 27240)
@@ -301,7 +301,8 @@
/* compute shadow */
if((re->params.r.mode & R_SHADOW) && (shi->material.mat->mode & MA_SHADOW))
- lamp_shadow(lashdw, re, lar, shi, co, lco, lv);
+ /* TODO: we need caching to still work with multi sample .. */
+ lamp_shadow(lashdw, re, lar, shi, co, lco, lv, (shi->shading.depth || r));
else
lashdw[0]= lashdw[1]= lashdw[2]= 1.0f;
@@ -547,13 +548,12 @@
/****************** shadow ***********************/
void lamp_shadow(float lashdw[3], Render *re, LampRen *lar, ShadeInput *shi,
- float co[3], float lco[3], float lv[3])
+ float co[3], float lco[3], float lv[3], int do_real)
{
LampShadowSubSample *lss= &(lar->shadsamp[shi->shading.thread].s[shi->shading.sample]);
/* TODO strand render bias is not same as it was before, but also was
mixed together with the shading code which doesn't work anymore now */
float inp = (shi->geometry.tangentvn)? 1.0f: dot_v3v3(shi->geometry.vn, lv);
- int do_real = (lar->ray_totsamp > 1)? 1: shi->shading.depth; // TODO caching doesn't work for multi-sample
lashdw[0]= lashdw[1]= lashdw[2]= 1.0f;
Modified: branches/render25/source/blender/render/intern/source/rayshade.c
===================================================================
--- branches/render25/source/blender/render/intern/source/rayshade.c 2010-03-03 08:56:48 UTC (rev 27239)
+++ branches/render25/source/blender/render/intern/source/rayshade.c 2010-03-03 10:17:22 UTC (rev 27240)
@@ -75,8 +75,6 @@
#define DEPTH_SHADOW_TRA 10
-int TOTRAY = 0;
-
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */
/* defined in pipeline.c, is hardcopy of active dynamic allocated Render */
/* only to be used here in this file, it's for speed */
@@ -200,9 +198,6 @@
{
ObjectInstanceRen *obi;
- printf("tot ray: %d (%.3f million)\n", TOTRAY, TOTRAY/1e6);
- TOTRAY= 0;
-
if(rdb->raytree)
{
RE_rayobject_free(rdb->raytree);
@@ -1781,8 +1776,6 @@
{
memset(isec, 0, sizeof(*isec));
- TOTRAY++;
-
copy_v3_v3(isec->start, start);
mul_v3_v3fl(isec->vec, vec, maxdist);
isec->labda= 1.0f;
More information about the Bf-blender-cvs
mailing list