src/raytracer.cc
branchpyrit
changeset 40 929aad02c5f2
parent 34 28f6e8b9d5d1
child 42 fbdeb3e04543
equal deleted inserted replaced
39:7079dcc3bd74 40:929aad02c5f2
   188 			}
   188 			}
   189 			col = (1-refl-trans)*col + refl*refl_col + trans*trans_col;
   189 			col = (1-refl-trans)*col + refl*refl_col + trans*trans_col;
   190 		}
   190 		}
   191 
   191 
   192 		// ambient occlusion
   192 		// ambient occlusion
   193 		if (ao_samples)
   193 		if (!from_inside && ao_samples)
   194 		{
   194 		{
   195 			Float miss = 0;
   195 			Float miss = 0;
   196 			for (int i = 0; i < ao_samples; i++) {
   196 			for (int i = 0; i < ao_samples; i++) {
   197 				Vector3 dir = SphereDistribute(i, ao_samples, ao_angle, normal);
   197 				Vector3 dir = SphereDistribute(i, ao_samples, ao_angle, normal);
   198 				Ray ao_ray = Ray(P, dir);
   198 				Ray ao_ray = Ray(P, dir);