Commit 92f0e694 authored by Lukas Werner's avatar Lukas Werner
Browse files

Inverted color of ppm output images (white is closest now)

parent 2e37865b
Pipeline #6944 canceled with stage
......@@ -147,9 +147,9 @@ void Raytracer::writeTBufferToFile(const std::map<Coordinates, real_t, Coordinat
char r = 0, g = 0, b = 0;
real_t t = tBuffer.at(c);
if (realIsIdentical(t, INFINITY)) {
r = g = b = (char)255;
r = g = b = (char)0;
} else {
r = g = b = (char)(240 * ((t-t_min)/(t_max-t_min)));
r = g = b = (char)(240 * (1-(t-t_min)/(t_max-t_min)));
}
ofs << r << g << b;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment