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);
}
+3 -3
View File
@@ -10,14 +10,14 @@ scene
camera
{
position <1.5, -1.0, 1.2>
position <1.0, -2, 1.2>
look_at <0, 0, 0.4>
up <0, 0, 1>
}
light
{
position <3, -8, 5>
position <10, 0, 10>
}
define material cyan
@@ -66,7 +66,7 @@ scene
size <0.2, 0, 0.3>
rotate 180, <1, 0, 0>
translate <0, 0, 0.3>
material cyan
material cyan
}
cyl {
size <0.2, 0, 0.3>