aboutsummaryrefslogtreecommitdiffstats
path: root/src/color.cpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2020-12-31 14:20:40 +0100
committerladevieq <ladevie.quentin@gmail.com>2020-12-31 14:20:40 +0100
commit6713cf8a0be4926011292a28514d60fd9418afd4 (patch)
tree36253e503018524ba29a48219a85c81614666d3b /src/color.cpp
parentea74cfc0a87726218a6ae3a5aece8603460e61af (diff)
Replace double by floats, fix missing padding issues, display a sphere
Diffstat (limited to 'src/color.cpp')
-rw-r--r--src/color.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/color.cpp b/src/color.cpp
index 565516f..c1036e0 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -6,10 +6,10 @@ void write_color(std::ostream& out, const color& pixel_color, uint32_t samples_p
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);
+ // 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)) << ' '