POV-Ray : Newsgroups : povray.text.scene-files : Looking for rendering Omnidirectional Stereo images for VR headset : Re: Looking for rendering Omnidirectional Stereo images for VRheadset Server Time
29 Apr 2024 04:21:27 EDT (-0400)
  Re: Looking for rendering Omnidirectional Stereo images for VRheadset  
From: William F Pokorny
Date: 11 Mar 2016 19:47:31
Message: <56e36723$1@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.