Core implementation of Physical Based Rendering.

This commit is contained in:
Areloch 2018-09-15 20:19:57 -05:00
parent 54f1d8c18e
commit b4a1d18f42
148 changed files with 4464 additions and 1016 deletions

View file

@ -175,6 +175,13 @@ inline F32 mMax(const F32 x, const F32 y)
return y;
}
inline F32 mMin(const F32 x, const F32 y)
{
if (x < y)
return x;
return y;
}
inline F32 mFloor(const F32 val)
{
return (F32) floor(val);

View file

@ -221,6 +221,11 @@ inline Point4F Point4F::operator /(F32 t) const
return Point4F( x * f, y * f, z * f, w * f );
}
inline F32 mDot(const Point4F &p1, const Point4F &p2)
{
return (p1.x*p2.x + p1.y*p2.y + p1.z*p2.z + p1.w*p2.w);
}
//------------------------------------------------------------------------------
//-------------------------------------- Point4F