Working on refraction & transparency.

Lots of work left to do!
This commit is contained in:
Godzil
2020-02-21 18:59:14 +00:00
parent 89dd74fa7c
commit df52cb36db
9 changed files with 219 additions and 9 deletions

View File

@@ -108,7 +108,8 @@ Tuple World::shadeHit(Computation comps, uint32_t depthCount)
Tuple World::colourAt(Ray r, uint32_t depthCount)
{
Intersection hit = this->intersect(r).hit();
Intersect allHits = this->intersect(r);
Intersection hit = allHits.hit();
if (hit.nothing())
{
@@ -116,7 +117,7 @@ Tuple World::colourAt(Ray r, uint32_t depthCount)
}
else
{
return this->shadeHit(hit.prepareComputation(r), depthCount);
return this->shadeHit(hit.prepareComputation(r, &allHits), depthCount);
}
}