diff -r d0d76e8a5203 -r b8232edee786 src/raytracer.cc --- a/src/raytracer.cc Wed Dec 05 18:54:23 2007 +0100 +++ b/src/raytracer.cc Fri Dec 07 14:56:39 2007 +0100 @@ -100,6 +100,9 @@ Colour acc = Colour(); Vector3 P = ray.o + ray.dir * nearest_distance; // point of intersection Vector3 normal = nearest_shape->normal(P); + // make shapes double sided + if (dot(normal, ray.dir) > 0.0) + normal = - normal; acc = PhongShader_ambient(*nearest_shape->material, P); vector::iterator light;