Commits

Anonymous committed cf0d13b

about to pull out parsing combinators into a separate module

Comments (0)

Files changed (2)

       if surf.reflectance > 0.01 && depth < max_depth then
 	let rrd = strip_norm ray_reflect_dir in
 	let next_src = v3_add isect.location (v3_mul rrd 0.000001) in
-	render_ray (depth+1) max_depth next_src shapes
-	  lights bg ambience ray_reflect_dir
+	  render_ray (depth+1) max_depth next_src shapes
+	    lights bg ambience ray_reflect_dir
       else rgb_black
     in
       if depth < max_depth then
 {"bg":[255,0,0],
  "ambience":0.075,
- "bounces":1,
+ "bounces":4,
  "camera": {
  	   "origin":[0,0,0],
 	   "out":[1.0,0,0],
 	   "height":768,
 	   "xangle":2.0,
 	   "yangle":1.5},
- "lights": [{"light_color":[255,50,50], "light_center":[4.0,6.0,0.0]},
-            {"light_color":[100,255,100],"light_center":[0.0, 0.0, -3.0]}],
+ "lights": [{"light_color":[255,100,50], "light_center":[4.0,6.0,0.0]},
+            {"light_color":[50,255,100],"light_center":[0.0, 0.0, -3.0]}],
  "shapes": [{"name":"sphere","fields":{
 		"center":[10.0,1.0,-2.0],
 		"radius":2.5,
  	   	"sph_id":1, 
 		"sph_surf":{"surface_color":[25,255,0],
 			    "reflectance":0.0,
-  			    "albedo":1.0}}},
+  			    "albedo":0.9}}},
 	    {"name":"sphere","fields":{
 		"center":[6.0,2.25,1.25],
 		"radius":0.75,
 		"sph_id":2,
 		"sph_surf":{"surface_color":[255,255,10],
-			    "reflectance":1.0,
+			    "reflectance":0.0,
 			    "albedo":0.0}}},
 	    {"name":"plane","fields":{
 		"plane_normal":[-1.0, 0.0, -1.0],
 		"offset":15,
 		"plane_id":3,
 		"plane_surf":{"surface_color":[125,125,255],
-			      "reflectance":0.0,
-			      "albedo":1.0}}},
+			      "reflectance":0.25,
+			      "albedo":0.05}}},
 	    {"name":"plane","fields":{
 		"plane_normal":[-1.0,0.0,1.0],
 		"offset":15,
 		"plane_id":4,
 		"plane_surf":{"surface_color":[200,200,20],
-			      "reflectance":0.0,
-			      "albedo":0.2}}},
+			      "reflectance":0.25,
+			      "albedo":0.05}}},
 	   {"name":"sphere","fields":{
 		"center":[9.0,-3.0,-6.0],
 		"radius":0.75,
 		"sph_id":5,
 		"sph_surf":{"surface_color":[255,255,255],
-			    "reflectance":1.0,
+			    "reflectance":0.0,
 			    "albedo":1.0}}},
 	   {"name":"plane","fields":{
 		"plane_normal":[-0.5,1.0,0.0],