I altered lighting.cpp so that the sign of the sqrt is checked before use.
If it is negative, F is set to 1 (leading to Reflection_Max). Otherwise the
behaviour is unchanged. I ran the scene provided by sascha with the same
width and height and got this:
http://www.compsoc.man.ac.uk/~tomy/pov/tir.jpg
(~3K JPEG).
This was on a linux PC, gcc 2.95.3. The edges (where TIR is undoubtably
occurring) seem a bit cleaner to me.
Post a reply to this message
|