aboutsummaryrefslogtreecommitdiffstats
path: root/src/color.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.cpp')
-rw-r--r--src/color.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/color.cpp b/src/color.cpp
index 92195de..555ff8d 100644
--- a/src/color.cpp
+++ b/src/color.cpp
@@ -2,9 +2,9 @@
#include "utils.hpp"
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 r = pixel_color.v[0];
+ auto g = pixel_color.v[1];
+ auto b = pixel_color.v[2];
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)) << ' '