From 10ee4be624e665db9ad83c6bf877c6c5b5e3d443 Mon Sep 17 00:00:00 2001 From: ladevieq Date: Fri, 1 Jan 2021 23:30:43 +0100 Subject: Add multi sampling --- src/color.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/color.cpp') diff --git a/src/color.cpp b/src/color.cpp index c1036e0..33351a8 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -1,16 +1,11 @@ #include "color.hpp" #include "rt.hpp" -void write_color(std::ostream& out, const color& pixel_color, uint32_t samples_per_pixel) { +void write_color(std::ostream& out, const color& pixel_color) { auto r = pixel_color.x; auto g = pixel_color.y; auto b = pixel_color.z; - // auto scale = 1.0 / samples_per_pixel; - // r = sqrt(r * scale); - // g = sqrt(g * scale); - // b = sqrt(b * scale); - out << static_cast(256.0 * clamp(r, 0.0, 0.999)) << ' ' << static_cast(256.0 * clamp(g, 0.0, 0.999)) << ' ' << static_cast(256.0 * clamp(b, 0.0, 0.999)) << std::endl; -- cgit v1.3