diff options
author | Keuin <[email protected]> | 2022-04-13 14:42:59 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-04-13 14:42:59 +0800 |
commit | 3caba9694f6e6f0f8b51dcffd7619fa04fbe6c29 (patch) | |
tree | 0975252facef9f71931dee7bbd526bcfccf49ad4 /viewport.h | |
parent | 4ad345447384ae9327cab0977b95d0b67f8bde57 (diff) |
Antialiasing. (not parallelized)
Diffstat (limited to 'viewport.h')
-rw-r--r-- | viewport.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -88,8 +88,8 @@ public: assert(bx < 1.0); assert(by < 1.0); const vec3d off{ - .x=1.0 * i / img_hw * half_width + bx, - .y=1.0 * j / img_hh * half_height + by, + .x=(1.0 * i + bx) / img_hw * half_width, + .y=(1.0 * j + by) / img_hh * half_height, .z=0.0 }; // offset on screen plane const auto dir = r + off; // direction vector from camera to current pixel on screen |