On 03/11/2016 07:13 PM, William F Pokorny wrote:
>
> It looks like the difference has something to do with this test in
> <install>/source/core/render/tracepixel.cpp :
>
> // if (cameraDirection.IsNearNull(EPSILON))
> // return false;
>
> because if commented as shown above, I get the same result seen from the
> posted windows exe result. I'm still playing and I'll post more if I
> learn more.
>
> Bill P.
Using fabs() instead of abs() in the following two places in
<install>/source/coure/math/vector.h fixes the Ubuntu 14.04 issue for me.
... for 2D vectors
inline bool IsNearNull(T epsilon) const
{
return (fabs(vect[X]) < epsilon) &&
(fabs(vect[Y]) < epsilon);
}
... for 3D vectors
inline bool IsNearNull(T epsilon) const
{
return (fabs(vect[X]) < epsilon) &&
(fabs(vect[Y]) < epsilon) &&
(fabs(vect[Z]) < epsilon);
}
I believe fabs() is the safe function to use. Must be the MS compiler in
use did the right thing with just abs() on seeing the input is a float.
Bill P.
Post a reply to this message
|