Esempio n. 1
0
File: udray.cpp Progetto: ReeLiu/ray
void raytrace_one_pixel(int i, int j)
{
	double x, y;
	Vect eye_color;

	x = 0.5 + (double) i;   // the "center" of the pixel
	y = 0.5 + (double) j;

	set_pixel_ray_direction(x, y, ray_cam, eye_ray);

	eye_color[R] = eye_color[G] = eye_color[B] = 0.0;
	trace_ray(0, 1.0, eye_ray, eye_color);

	draw_point(i, j, eye_color, ray_cam->im);
}
Esempio n. 2
0
void raytrace_one_pixel(int i, int j)
{
	double x, y;
	Vect eye_color;

	x = 0.5 + (double) i;   // the "center" of the pixel
	y = 0.5 + (double) j;

	set_pixel_ray_direction(x, y, ray_cam, eye_ray);

	eye_color[R] = eye_color[G] = eye_color[B] = 0.0;
	trace_ray(0, 1.0, eye_ray, eye_color);

	draw_point(i, j, eye_color, ray_cam->im);

	// image_i++;

	// if (image_i == ray_cam->im->w) {
	// 	image_i = 0;
	// 	image_j++;
	// }  

	// thread_count--;
}