Wrong threshold for reflection rays (prevent go through backside) caused

errors in rays going extreme close along surface. Like bug #1471 shows.

Threshold removed, can't find any sample where this happens now...
This commit is contained in:
Ton Roosendaal
2004-07-26 20:09:43 +00:00
parent 653abbae6c
commit ca6c0861cf

View File

@@ -1412,11 +1412,6 @@ static void reflection(float *ref, float *n, float *view, float *orn)
f1= -2.0*(n[0]*view[0]+ n[1]*view[1]+ n[2]*view[2]);
if(orn==NULL) {
// heuristic, should test this! is to prevent normal going to the back
if(f1> -0.2) f1= -0.2;
}
ref[0]= (view[0]+f1*n[0]);
ref[1]= (view[1]+f1*n[1]);
ref[2]= (view[2]+f1*n[2]);