ccdemos/realtime.cc
branchpyrit
changeset 93 96d65f841791
parent 92 9af5c039b678
child 100 c005054bf4c1
--- a/ccdemos/realtime.cc	Mon May 05 15:31:14 2008 +0200
+++ b/ccdemos/realtime.cc	Tue May 06 09:39:58 2008 +0200
@@ -11,21 +11,23 @@
 	KdTree top;
 	Camera cam;
 
-	rt.setMaxDepth(3);
+	rt.setMaxDepth(2);
 	rt.setTop(&top);
 
-	Light light1(Vector(2.0f, -5.0f, -5.0f), Colour(0.7f, 0.3f, 0.6f));
+	Light light1(Vector(2.0f, -5.0f, -5.0f), Colour(0.2f, 0.3f, 0.8f));
 	light1.castShadows(false);
 	rt.addLight(&light1);
 
-	Light light2(Vector(-2.0f, 10.0f, 2.0f), Colour(0.4f, 0.6f, 0.3f));
+	Light light2(Vector(-2.0f, 10.0f, 2.0f), Colour(0.5f, 0.6f, 0.3f));
 	light2.castShadows(false);
 	rt.addLight(&light2);
 
 	Material mat_sph(Colour(1.0f, 1.0f, 1.0f));
+	mat_sph.setPhong(0.2f, 0.9f, 0.0f, 1.0f);
+	mat_sph.setReflectivity(0.3f);
 	for (int y=0; y<10; y++)
 		for (int x=0; x<10; x++)
-			rt.addShape(new Sphere(Vector(x*2-10, (Float)rand()/RAND_MAX*5.0f, y*2-10), 0.45f, &mat_sph));
+			rt.addShape(new Sphere(Vector((Float)x*2-10, (Float)rand()/RAND_MAX*5.0f, (Float)y*2-10), 0.45f, &mat_sph));
 
 	rt.setCamera(&cam);
 	cam.setEye(Vector(0,0,10));