|
|
Le 13.03.2009 02:58, Chris Cason nous fit lire :
> clipka wrote:
>> Confirmed the error - and found the culprit!
>>
>> Chris, there is a bug in the IsoSurface::All_Intersections() implementation -
>> and possibly a misconception about the RefPool:
>
> Good work!:)
As Beta 32 is still displaying the issue, I would suggest the following correction
(on Beta 32 sources):
Poping the entry added locally, and leaving the remaining untouched.
Tested with the problematic scene of this thread, looks ok.
Not done: checking all other All_Intersection method to find if some are also using
that
lazy shortcut of pushing intersection and returning false. Left as an exercise for the
good people.
Not an optimal patch, as an optimal patch would have avoided, with less instructions,
to
push an intersection to pop it a fraction of second later. Not sure such optimal patch
might exist.
diff -r da476cece3cc source/backend/shape/isosurf.cpp
--- a/source/backend/shape/isosurf.cpp Mon Apr 13 14:10:46 2009 +0200
+++ b/source/backend/shape/isosurf.cpp Mon Apr 13 20:16:48 2009 +0200
@@ -277,5 +277,11 @@
tmin = Depth1 = min(Depth2, Depth1);
if((tmax - tmin) < accuracy)
- return (false);
+ {
+ if (IFound==true)
+ {
+ Depth_Stack->pop();
+ }
+ return (false);
+ }
Thread->Stats[Ray_IsoSurface_Tests]++;
if((Depth1 < accuracy) && (Thread->isosurfaceData->Inv3 == 1))
Post a reply to this message
|
|