POV-Ray : Newsgroups : povray.general : linux and windows version produce different output : Re: linux and windows version produce different output Server Time
4 Nov 2024 17:33:07 EST (-0500)
  Re: linux and windows version produce different output  
From: Tom York
Date: 13 Nov 2003 03:30:01
Message: <web.3fb33fefdf2bb6e4ca7812b30@news.povray.org>
ABX wrote:
>On Wed, 12 Nov 2003 17:03:10 +0100, sascha <sas### [at] userssourceforgenet>
>wrote:
>Somehow I missed 'fresnel' keyword, sorry. In case of 'fresnel' there was a
>problem related to equation I also found. This is a line:
>
>  g = sqrt(Sqr(ior) + Sqr(cos_angle) - 1);
>
>in lighting.cpp (in determine_reflectivity()). For some cases (also official
>benchmark) it caused evaluation of sqrt for negative values. Depending on
>compiler it could behave different.
>
>And this is _not_ fixed yet. Any ideas would be appreciated for sure.
>
>ABX
>

That line appears to be calculating the cosine of the angle of refraction
from the cosine of the angle of incidence - you can derive the expression by
writing Snell's law of refraction in terms of cosines. Negative values in
that sqrt will correspond to total internal reflection, I think. I don't see
a simple solution (unless you trap internally reflected rays somewhere
already?)


Post a reply to this message

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