Underflow case in Blinn spec... resulting in large negative values to be
returned in certain cases, causing (again!) black dots.
Thanks randall for clear report with nice demo file. :)
This commit is contained in:
2005-04-11 10:20:17 +00:00
parent 4f55dd8c91
commit f08c0f388a

View File

@@ -794,7 +794,8 @@ float Blinn_Spec(float *n, float *l, float *v, float refrac, float spec_power )
ang = saacos(nh);
i= f * g * exp((double)(-(ang*ang) / (2.0*spec_power*spec_power)));
if(i<0.0) i= 0.0;
return i;
}