diff -r c1080cb5bd6d -r fbdeb3e04543 src/scene.cc --- a/src/scene.cc Tue Dec 18 12:36:01 2007 +0100 +++ b/src/scene.cc Sat Dec 29 13:53:33 2007 +0100 @@ -95,10 +95,10 @@ bool Sphere::intersect(const Ray &ray, Float &dist) const { Vector3 V = ray.o - center; - register Float d = -dot(V, ray.dir); + register Float d = dot(V, ray.dir); register Float Det = d * d - (dot(V,V) - sqr_radius); if (Det > 0) { - d -= sqrtf(Det); + d = -d - sqrtf(Det); if (d > 0 && d < dist) { dist = d;