changed Scene::calculateLightContribution() to return a Color instead of a double and take into account the color of any semi-transparent objects that are passed through en route to the light source... this leads to shadow colors tainted by the color of the objects through which the light is travelling
git-svn-id: svn://anubis/fart/trunk@211 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
1 parent
a24452af01
commit
86888fa461
5 files changed
+21
-8
No files matched your search
@@ -79,6 +79,14 @@ Color & Color::operator*=(double scale)
|
||||
return *this;
|
||||
}
|
||||
|
||||
Color & Color::operator*=(const Color & other)
|
||||
{
|
||||
r *= other.r;
|
||||
g *= other.g;
|
||||
b *= other.b;
|
||||
return *this;
|
||||
}
|
||||
|
||||
Color operator+(const Color & c1, const Color & c2)
|
||||
{
|
||||
return Color(c1.r + c2.r, c1.g + c2.g, c1.b + c2.b);
|
||||
|
||||
@@ -22,6 +22,7 @@ class Color
|
||||
Color & operator+=(const Color & other);
|
||||
Color & operator-=(const Color & other);
|
||||
Color & operator*=(double scale);
|
||||
Color & operator*=(const Color & other);
|
||||
|
||||
static const Color black;
|
||||
static const Color white;
|
||||
|
||||
Reference in new issue
Block a user