diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2020-12-20 14:49:20 +0100 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2020-12-20 14:49:20 +0100 |
| commit | 3935a609141623e7cfb3fa339da1a166e3917018 (patch) | |
| tree | ba8d6275b1f9947af92f9c887608f71f73e6609d /src/color.cpp | |
| parent | 2d8e108dd6811bcf55bed28f1855a36077f8c674 (diff) | |
Ray tracer renderer
Use ray for rendering
Setup basic rendering stuff camera / viewport
Diffstat (limited to 'src/color.cpp')
| -rw-r--r-- | src/color.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/color.cpp b/src/color.cpp index 2777d39..53a79f9 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -1,7 +1,7 @@ #include "color.hpp" -void write_color(std::ostream& out, color pixel_color) { - out << pixel_color.x << ' ' - << pixel_color.y << ' ' - << pixel_color.z << ' '; +void write_color(std::ostream& out, const color& pixel_color) { + out << static_cast<uint32_t>(255.0 * pixel_color.x) << ' ' + << static_cast<uint32_t>(255.0 * pixel_color.y) << ' ' + << static_cast<uint32_t>(255.0 * pixel_color.z) << std::endl; } |
