ccdemos/textures.cc
branchpyrit
changeset 48 a4913301c626
parent 47 320d5d466864
child 60 a23b5089b9c3
equal deleted inserted replaced
47:320d5d466864 48:a4913301c626
   185 }
   185 }
   186 
   186 
   187 int main(int argc, char **argv)
   187 int main(int argc, char **argv)
   188 {
   188 {
   189 	Raytracer rt;
   189 	Raytracer rt;
   190 	rt.setOversample(0);
       
   191 	rt.setSubsample(8);
       
   192 
   190 
   193 	Octree top;
   191 	Octree top;
   194 	rt.setTop(&top);
   192 	rt.setTop(&top);
   195 
   193 
   196 	rt.addlight(&light);
   194 	rt.addlight(&light);
   274 	/* render image */
   272 	/* render image */
   275 	if (argc == 2 && !strcmp(argv[1], "-r"))
   273 	if (argc == 2 && !strcmp(argv[1], "-r"))
   276 	{
   274 	{
   277 		pyrit_verbosity = 2;
   275 		pyrit_verbosity = 2;
   278 		Float *fdata = (Float *) malloc(w*h*3*sizeof(Float));
   276 		Float *fdata = (Float *) malloc(w*h*3*sizeof(Float));
   279 		rt.setOversample(2);
       
   280 		rt.setSubsample(1);
       
   281 		rt.ambientocclusion(300, 5.0, 0.5);
   277 		rt.ambientocclusion(300, 5.0, 0.5);
   282 		DefaultSampler sampler(fdata, w, h);
   278 		DefaultSampler sampler(fdata, w, h);
       
   279 		sampler.setOversample(2);
       
   280 		sampler.setSubsample(1);
   283 		rt.setSampler(&sampler);
   281 		rt.setSampler(&sampler);
   284 		rt.render();
   282 		rt.render();
   285 
   283 
   286 		struct image *img;
   284 		struct image *img;
   287 		new_image(&img, w, h, 3);
   285 		new_image(&img, w, h, 3);