Adding support for pattern.

Still a bit more work to be done there.
This commit is contained in:
Godzil
2020-02-21 09:36:34 +00:00
parent 9d0db6a635
commit 75cf59cc1a
14 changed files with 491 additions and 17 deletions

View File

@@ -45,7 +45,7 @@ int main()
Tuple hitPoint = r.position(hit.t);
Tuple hitNormalVector = hit.object->normalAt(hitPoint);
Tuple eye = -r.direction;
Colour pixelColour = hit.object->material.lighting(light, hitPoint, eye, hitNormalVector);
Colour pixelColour = hit.object->material.lighting(light, hitPoint, eye, hitNormalVector, hit.object);
c.putPixel(x, y, pixelColour);
}