tweaked Scene::calculateLightContribution() and scenes/cyls.fart slightly

git-svn-id: svn://anubis/fart/trunk@189 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2009-03-07 18:38:40 +00:00
1 parent 608939bff4
commit feeaa34d62
2 files changed
+6 -5

No files matched your search

+3 -2
View File
@@ -311,7 +311,9 @@ double Scene::calculateLightContribution(const Ray & toLight,
if ( hit.shape.isNull() )
break;
if ( dist_so_far + hit.dist > dist_to_light )
double offset = hit.dist + 0.0001;
if ( dist_so_far + offset > dist_to_light )
break;
contrib *= hit.shape->getMaterial()->getTransparency();
@@ -319,7 +321,6 @@ double Scene::calculateLightContribution(const Ray & toLight,
if ( contrib < SCENE_FACTOR_THRESHOLD )
break;
double offset = hit.dist + 0.0001;
dist_so_far += offset;
currentRay = currentRay.shift(offset);
}