ccdemos/spheres_shadow.cc
branchpyrit
changeset 48 a4913301c626
parent 47 320d5d466864
child 60 a23b5089b9c3
equal deleted inserted replaced
47:320d5d466864 48:a4913301c626
    54 }
    54 }
    55 
    55 
    56 int main(int argc, char **argv)
    56 int main(int argc, char **argv)
    57 {
    57 {
    58 	Raytracer rt;
    58 	Raytracer rt;
    59 	rt.setOversample(0);
       
    60 	rt.setSubsample(8);
       
    61 
    59 
    62 	Octree top;
    60 	Octree top;
    63 	rt.setTop(&top);
    61 	rt.setTop(&top);
    64 
    62 
    65 	rt.addlight(&light);
    63 	rt.addlight(&light);
   109 	/* render image */
   107 	/* render image */
   110 	if (argc == 2 && !strcmp(argv[1], "-r"))
   108 	if (argc == 2 && !strcmp(argv[1], "-r"))
   111 	{
   109 	{
   112 		pyrit_verbosity = 2;
   110 		pyrit_verbosity = 2;
   113 		Float *fdata = (Float *) malloc(w*h*3*sizeof(Float));
   111 		Float *fdata = (Float *) malloc(w*h*3*sizeof(Float));
   114 		rt.setOversample(2);
       
   115 		DefaultSampler sampler(fdata, w, h);
   112 		DefaultSampler sampler(fdata, w, h);
       
   113 		sampler.setOversample(2);
   116 		rt.setSampler(&sampler);
   114 		rt.setSampler(&sampler);
   117 		rt.render();
   115 		rt.render();
   118 
   116 
   119 		struct image *img;
   117 		struct image *img;
   120 		new_image(&img, w, h, 3);
   118 		new_image(&img, w, h, 3);