aboutsummaryrefslogtreecommitdiffstats
path: root/src/color.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-01-01 23:30:43 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-01-01 23:30:43 +0100
commit10ee4be624e665db9ad83c6bf877c6c5b5e3d443 (patch)
treeebeb102e599531cdd04c2bf769ae80406e177a02 /src/color.cpp
parentca7f65d7cc2d82ce1bd752785fd100a1855b4dc3 (diff)
Add multi sampling
Diffstat (limited to 'src/color.cpp')
-rw-r--r--src/color.cpp7
1 files changed, 1 insertions, 6 deletions
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<uint32_t>(256.0 * clamp(r, 0.0, 0.999)) << ' '
<< static_cast<uint32_t>(256.0 * clamp(g, 0.0, 0.999)) << ' '
<< static_cast<uint32_t>(256.0 * clamp(b, 0.0, 0.999)) << std::endl;