Bugfix #6181
authorTon Roosendaal <ton@blender.org>
Mon, 12 Mar 2007 14:25:44 +0000 (14:25 +0000)
committerTon Roosendaal <ton@blender.org>
Mon, 12 Mar 2007 14:25:44 +0000 (14:25 +0000)
An acos() getting a negative value caused 'ray trace shadow bias' to go
wrong (and object render entirely black). Only in very rare cases... but
nevertheless a nice discovery fixing other unpredictable issues.
(Symptom: entire object renders black)

source/blender/render/intern/source/convertblender.c

index 14c66927c826eba8b79cc54f458c18a62d5e4175..e5bfedafc97be4f963fe0505a53e95af7642076b 100644 (file)
@@ -2873,7 +2873,7 @@ static void set_phong_threshold(Render *re, Object *ob, int startface, int numfa
        
        if(tot) {
                thresh/= (float)tot;
-               ob->smoothresh= cos(0.5*M_PI-acos(thresh));
+               ob->smoothresh= cos(0.5*M_PI-saacos(thresh));
        }
 }