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:
parent
608939bff4
commit
feeaa34d62
@ -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);
|
||||
}
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user