src/raytracer.cc
branchpyrit
changeset 56 d4481fc43952
parent 55 f6d75ae82c88
child 67 249553e1d4fe
--- a/src/raytracer.cc	Sat Mar 29 12:09:50 2008 +0100
+++ b/src/raytracer.cc	Sat Mar 29 17:54:27 2008 +0100
@@ -206,8 +206,8 @@
 					refl += R*trans;
 					trans = (1-R)*trans;
 					Vector3 newdir = n * ray.dir + (n*cos_i - cos_t) * normal;
-					Ray newray = Ray(P, newdir);
-					trans_col = raytrace(newray, depth + 1, nearest_shape);
+					Ray newray = Ray(P + 0.001*newdir, newdir);
+					trans_col = raytrace(newray, depth + 1, NULL);
 				}
 			}
 			col = (1-refl-trans)*col + refl*refl_col + trans*trans_col;