image {
	width 512
	height 512
	samples 1
	//TODO: determine sample kind
}

camera {
	position 0.0 5.0 2.0 center 0.0 0.0 0.0
	//position -2.0 0.0 1.0 center 0.0 0.0 1.0
	up 0.0 0.0 1.0
	image_plane 1.0
	aperture 0.1 1
	focal 0.55
}

light "light1" {
	color 1.0 1.0 1.0
	object:sphere { radius 0.5
	//object:point {
		position 4 4 4
	}
}

//TODO: per-light ambient, diffuse, specular, etc.?
//TODO: material inheritance?
material "plane_material" {
	//action:reflect 0.2 1
	action:shadow "light1" 10
	diffuse 0.05 0.05 1.0
	specular 0.2 0.3 1.0
	shininess 3
}
//material  "sphere1_material" {
//	action:reflect 0.2 1
//	action:refract 0.8 1
//	action:shadow "light1" 10
//	diffuse 1.00 0.05 0.05
//	specular 1. .9 .9
//	index 1.5 100.0
//	shininess  10
//}
material  "sphere1_material" {
	//action:reflect 1.0 10
	action:refract 1.0 10
	action:shadow "light1" 10
	diffuse 0.0 0.0 0.0
	specular 1.0 1.0 1.0
	index 1.5 8000.0
	shininess 100
}
material  "sphere2_material" {
	//action:reflect 0.2 1
	action:shadow "light1" 10
	diffuse 0.05 1.00 0.05
	specular .9 1. .9
	shininess  30
}
material "triangle_material" {
	action:reflect 0.2 1
	action:shadow "light1" 10
	diffuse 1.00 1.00 0.05
	specular 1. 1. .9
	shininess 100
	//TODO "1//sdf" should not be an error
}

scene {
	background 64 64 64
	
	object:sphere {
		use "sphere1_material"
		position 0 0 1
		radius 1
	}
	
	object:sphere { use "sphere1_material" radius 0.5
		position 2.3 0.2 0.5
	}
	object:sphere { use "sphere1_material" radius 0.5
		position 1 1.4 0.5
	}
	object:sphere { use "sphere1_material" radius 0.5
		position -1.5 -0.5 0.5
	}
	object:sphere { use "sphere1_material" radius 0.5
		position -2.3 0.4 0.5
	}
	object:sphere { use "sphere1_material" radius 0.3
		position -1.3 1.1 0.3
	}
	object:sphere { use "sphere1_material" radius 0.3
		position -1.2 3.0 0.3
	}
	object:sphere { use "sphere1_material" radius 0.2
		position 2.3 2.6 0.2
	}
	
	//object:sphere {
	//	use "sphere2_material"
	//	position 2 2 0.2
	//	radius 1
	//}
	object:plane {
		use "plane_material"
		position 0 0 0
		normal 0 0 1
	}
	object:plane {
		use "plane_material"
		position 0 -3 0
		normal 0 1 0
	}
	//object:triangle {
	//	use "triangle_material"
	//	position -1 -1 0.02
	//	position2 2 -2 .02
	//	position3 -1.5 -1.5 1.5
	//}
}

//Notes:
//"0.0/**/0.0" will be treated as "0.0 0.0".
//For colors, if the first number is an int, the numbers will be treated as 0-255
//Else, 0.0-1.0

















