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:
1 parent
eb14077ab7
commit
57a4e6ed8a
7 files changed
+74
-40
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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
@@ -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
@@ -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];
|
||||
|
||||
Reference in new issue
Block a user