{
for (int x = 0; x < scene.camera()->resX(); x++)
{
- /* Initialize your ray here */
+ /* Initialize your ray here */ //int x = 319, y = 59;
// shoot four rays for antialiasing
scene.camera()->InitRay(x+0.5,y+0.5, ray); // initialize ray
Vec3f col1 = scene.RayTrace(ray);
scene.camera()->InitRay(x-0.5,y-0.5, ray); // initialize ray
Vec3f col4 = scene.RayTrace(ray);
- img(x,y) = (col1 + col2 + col3 + col4) / 4.0; // store pixel color
+ img(x,y) = (col1 /*+ col2 + col3 + col4) / 4.0*/ ); // store pixel color
//std::cerr << "Main: Image color = " << img(x,y) << std::endl;
}
}
int main(int, char**)
{
- RenderFrameFlat("flatshaded.ppm");
- RenderFrameEyeLight("eyelight.ppm");
+ //RenderFrameFlat("flatshaded.ppm");
+ //RenderFrameEyeLight("eyelight.ppm");
RenderFrameReflectiveEyeLight("reflective.ppm");
}