paysages3d/src/render/software/AtmosphereResult.cpp

20 lines
483 B
C++
Raw Normal View History

2013-12-08 17:36:39 +00:00
#include "AtmosphereResult.h"
AtmosphereResult::AtmosphereResult() {
2013-12-08 17:36:39 +00:00
base = COLOR_BLACK;
inscattering = COLOR_BLACK;
attenuation = COLOR_WHITE;
mask = COLOR_TRANSPARENT;
distance = 0.0;
final = COLOR_BLACK;
}
void AtmosphereResult::updateFinal() {
2013-12-08 17:36:39 +00:00
final.r = base.r * attenuation.r + inscattering.r;
final.g = base.g * attenuation.g + inscattering.g;
final.b = base.b * attenuation.b + inscattering.b;
final.a = 1.0;
2013-12-11 09:24:35 +00:00
final.mask(mask);
2013-12-08 17:36:39 +00:00
}