From 8da53c5f262b09756e1a93257cdcd5be25807839 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Mon, 21 Dec 2020 23:13:25 +0100 Subject: Movable and rotatable camera + dielectric materials --- src/metal.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/metal.cpp') 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; -- cgit v1.3