diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 23:13:25 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2020-12-21 23:13:25 +0100 |
| commit | 8da53c5f262b09756e1a93257cdcd5be25807839 (patch) | |
| tree | c34344074ca8766dafcbf27958f571bf14c35315 /src/metal.cpp | |
| parent | 56bed8e38f5b6d9effd77371ad781ae71601205b (diff) | |
Movable and rotatable camera + dielectric materials
Diffstat (limited to 'src/metal.cpp')
| -rw-r--r-- | src/metal.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/metal.cpp b/src/metal.cpp index d02a2f7..196c95d 100644 --- a/src/metal.cpp +++ b/src/metal.cpp @@ -6,7 +6,7 @@ metal::metal(const color& albedo, double f) : albedo(albedo), fuzz(f < 1 ? f : 1) {} bool metal::scatter(const ray& r, const struct hit_info& info, color& attenuation, ray& scattered) const { - auto reflected = reflect(r.direction, info.normal).unit(); + auto reflected = reflect(r.direction.unit(), info.normal); scattered = ray { info.point, reflected + fuzz * random_in_unit_sphere() }; attenuation = albedo; |
