File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ Change Log -- Ray Tracing in One Weekend
1010- Fix: Update image and size for simple red sphere render
1111- Fix: Update image and size for sphere with normal-vector coloring
1212- Fix: Improve image size and aspect ratio calculation to make size changes easier
13+ - Fix: Added ` t ` parameter back into ` hit_record ` at correct place
1314
1415
1516----------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 748748 struct hit_record {
749749 vec3 p;
750750 vec3 normal;
751+ double t;
752+
751753 };
752754
753755 class hittable {
878880less work and put the determination at geometry time. This is simply a matter of preference and
879881you'll see both implementations in the literature.
880882
881- We add the `front_face` bool to the `hit_record` struct. I know that we’ ll also want motion blur at
882- some point, so I’ll also add a time input variable .
883+ We add the `front_face` bool to the `hit_record` struct. We' ll also add a function to solve this
884+ calculation for us .
883885
884886 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
885887 #ifndef HITTABLE_H
891893 vec3 p;
892894 vec3 normal;
893895 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
894- double t;
895896 bool front_face;
896897
897898 inline void set_face_normal(const ray& r, const vec3& outward_normal) {
You can’t perform that action at this time.
0 commit comments