mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-24 21:18:32 -05:00
limit RGB output to 0-255
This commit is contained in:
@@ -154,6 +154,10 @@ namespace {
|
||||
ppmFile << r << ' ' << g << ' ' << b << ' ';
|
||||
}
|
||||
else {
|
||||
r = std::min(r, 1.0);
|
||||
g = std::min(g, 1.0);
|
||||
b = std::min(b, 1.0);
|
||||
|
||||
ppmFile
|
||||
<< static_cast<unsigned int>(r * 255) << ' '
|
||||
<< static_cast<unsigned int>(g * 255) << ' '
|
||||
|
||||
Reference in New Issue
Block a user