Minor change

This commit is contained in:
CJSatnarine
2024-10-12 11:27:03 -04:00
parent b760da4dba
commit 2c98cc7791
2 changed files with 1 additions and 8 deletions

View File

@@ -42,11 +42,6 @@ And to run the build:
You'll need an image viewer to view the PPM file. I used [feh](https://feh.finalrewind.org/).
# :scroll: To Do
A list of things I wish to implement:
- [ ] Triangle
# :book: Resources Used
[_Ray Tracing in One Weekend_](https://raytracing.github.io/books/RayTracingInOneWeekend.html)

View File

@@ -94,9 +94,7 @@ class camera {
// Construct a camera ray originating from the origin and directed at randomly sampled point around the pixel location i, j.
auto offset = sampleSquare();
auto pixelSample = pixel00Location
+ ((i + offset.x()) * pixelDeltaU)
+ ((j + offset.y()) * pixelDeltaV);
auto pixelSample = pixel00Location + ((i + offset.x()) * pixelDeltaU) + ((j + offset.y()) * pixelDeltaV);
auto rayOrigin = (defocusAngle <= 0) ? centre : defocusDiskSample();
auto rayDirection = pixelSample - rayOrigin;