Finally! We have reflections!

This commit is contained in:
Godzil
2020-02-21 17:21:06 +00:00
parent 9fffb68026
commit 7337ae4837
9 changed files with 174 additions and 12 deletions

View File

@@ -23,6 +23,7 @@ Computation Intersection::prepareComputation(Ray r)
}
Tuple overHitP = hitP + normalV * getEpsilon();
Tuple reflectV = r.direction.reflect(normalV);
return Computation(this->object,
this->t,
@@ -30,5 +31,6 @@ Computation Intersection::prepareComputation(Ray r)
eyeV,
normalV,
overHitP,
inside);
inside,
reflectV);
}