[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17194] branches/sim_physics/source/ blender/render/intern/source/volumetric.c: * fix for silly error in last commit
Matt Ebb
matt at mke3.net
Thu Oct 23 08:10:21 CEST 2008
Revision: 17194
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17194
Author: broken
Date: 2008-10-23 08:10:20 +0200 (Thu, 23 Oct 2008)
Log Message:
-----------
* fix for silly error in last commit
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-23 03:50:56 UTC (rev 17193)
+++ branches/sim_physics/source/blender/render/intern/source/volumetric.c 2008-10-23 06:10:20 UTC (rev 17194)
@@ -848,21 +848,24 @@
float tot=0.0f;
int i;
- x_ = xx+x;
- y_ = yy+y;
- z_ = zz+z;
-
for (x=-1; x <= 1; x++) {
+ x_ = xx+x;
if (x_ >= 0 && x_ <= res-1) {
+
for (y=-1; y <= 1; y++) {
+ y_ = yy+y;
if (y_ >= 0 && y_ <= res-1) {
+
for (z=-1; z <= 1; z++) {
+ z_ = zz+z;
if (z_ >= 0 && z_ <= res-1) {
+
i = rgb*res_3 + x_*res_2 + y_*res + z_;
if (cache[i] > 0.0f) {
tot += cache[i];
added++;
}
+
}
}
}
More information about the Bf-blender-cvs
mailing list