POV-Ray : Newsgroups : povray.programming : Parametric object with shadow gets black : Re: Parametric object with shadow gets black Server Time
5 Jul 2024 14:03:32 EDT (-0400)
  Re: Parametric object with shadow gets black  
From: Massimo Valentini
Date: 23 Jun 2003 16:18:02
Message: <3ef7607a@news.povray.org>
"Massimo Valentini" ha scritto 
: 
: I don't think a quick patch is easy, but, may be, it suffices a loop.
: 

Instead of a loop it is possible to set appropriately the range 
for intersections, so that the first is the correct. 

The following patch should fix the shadow problem, though not 
the accuracy one.

Massimo

--- obj/fpmetric.cpp 2003-06-23 22:10:24.000000000 +0200
+++ fpmetric.cpp 2003-06-23 22:11:30.000000000 +0200
@@ -222,6 +222,9 @@
  if (Depth1 == Depth2)
   Depth1 = 0;
 
+  if (Depth1 < DEPTH_TOLERANCE)
+    Depth1 = DEPTH_TOLERANCE;
+  
  if ((Depth1 += 4 * Par->accuracy) > Depth2)
   return false;


Post a reply to this message

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