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
10
10
- Fix: Update image and size for simple red sphere render
11
11
- Fix: Update image and size for sphere with normal-vector coloring
12
12
- 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
13
14
14
15
15
16
----------------------------------------------------------------------------------------------------
Original file line number Diff line number Diff line change 748
748
struct hit_record {
749
749
vec3 p;
750
750
vec3 normal;
751
+ double t;
752
+
751
753
};
752
754
753
755
class hittable {
878
880
less work and put the determination at geometry time. This is simply a matter of preference and
879
881
you'll see both implementations in the literature.
880
882
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 .
883
885
884
886
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++
885
887
#ifndef HITTABLE_H
891
893
vec3 p;
892
894
vec3 normal;
893
895
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C++ highlight
894
- double t;
895
896
bool front_face;
896
897
897
898
inline void set_face_normal(const ray& r, const vec3& outward_normal) {
You can’t perform that action at this time.
0 commit comments