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() )
|
if ( hit.shape.isNull() )
|
||||||
break;
|
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;
|
break;
|
||||||
|
|
||||||
contrib *= hit.shape->getMaterial()->getTransparency();
|
contrib *= hit.shape->getMaterial()->getTransparency();
|
||||||
@ -319,7 +321,6 @@ double Scene::calculateLightContribution(const Ray & toLight,
|
|||||||
if ( contrib < SCENE_FACTOR_THRESHOLD )
|
if ( contrib < SCENE_FACTOR_THRESHOLD )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
double offset = hit.dist + 0.0001;
|
|
||||||
dist_so_far += offset;
|
dist_so_far += offset;
|
||||||
currentRay = currentRay.shift(offset);
|
currentRay = currentRay.shift(offset);
|
||||||
}
|
}
|
||||||
|
@ -10,14 +10,14 @@ scene
|
|||||||
|
|
||||||
camera
|
camera
|
||||||
{
|
{
|
||||||
position <1.5, -1.0, 1.2>
|
position <1.0, -2, 1.2>
|
||||||
look_at <0, 0, 0.4>
|
look_at <0, 0, 0.4>
|
||||||
up <0, 0, 1>
|
up <0, 0, 1>
|
||||||
}
|
}
|
||||||
|
|
||||||
light
|
light
|
||||||
{
|
{
|
||||||
position <3, -8, 5>
|
position <10, 0, 10>
|
||||||
}
|
}
|
||||||
|
|
||||||
define material cyan
|
define material cyan
|
||||||
@ -66,7 +66,7 @@ scene
|
|||||||
size <0.2, 0, 0.3>
|
size <0.2, 0, 0.3>
|
||||||
rotate 180, <1, 0, 0>
|
rotate 180, <1, 0, 0>
|
||||||
translate <0, 0, 0.3>
|
translate <0, 0, 0.3>
|
||||||
material cyan
|
material cyan
|
||||||
}
|
}
|
||||||
cyl {
|
cyl {
|
||||||
size <0.2, 0, 0.3>
|
size <0.2, 0, 0.3>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user