trying new jitter method for soft shadows, getting better

git-svn-id: svn://anubis/fart/trunk@257 7f9b0f55-74a9-4bce-be96-3c2cd072584d
This commit is contained in:
Josh Holtrop committed 2010-07-13 06:35:45 +00:00
1 parent eb14077ab7
commit 57a4e6ed8a
7 files changed
+74 -40

No files matched your search

+16
View File
@@ -87,6 +87,22 @@ Color & Color::operator*=(const Color & other)
return *this;
}
Color & Color::operator/=(double scale)
{
r /= scale;
g /= scale;
b /= 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);
+2
View File
@@ -23,6 +23,8 @@ class Color
Color & operator-=(const Color & other);
Color & operator*=(double scale);
Color & operator*=(const Color & other);
Color & operator/=(double scale);
Color & operator/=(const Color & other);
static const Color black;
static const Color white;
+1 -1
View File
@@ -83,7 +83,7 @@ Vector Vector::reflect(const Vector & target) const
return (*this) + me_to_proj * 2.0;
}
Vector Vector::getPerpendicularVector() const
Vector Vector::getPerpendicular() const
{
Vector t = *this;
t.normalize();
+1 -1
View File
@@ -20,7 +20,7 @@ class Vector
Vector proj(const Vector & target) const;
Vector reflect(const Vector & target) const;
operator double() const { return mag(); }
Vector getPerpendicularVector() const;
Vector getPerpendicular() const;
protected:
double m_array[3];