image {
	width 1280
	height 800
	//width 512
	//height 512
	samples 100
	//TODO: determine sample kind
}

camera {
	position 1.5 10 2 center -0.3 0.0 0.1
	up -0.05 0.0 1.0
	image_plane 3.0
	focal 0.1
	aperture 0.3 2
}

light "light1" {
	color 1.0 0.5 0.5
	object:sphere { radius 0.5
		position 4 4 2
	}
}
light "light2" {
	color 0.8 0.8 1.0
	object:sphere { radius 0.1
		position -4 2 2
	}
}
light "light3" {
	color 0.5 1.0 0.5
	object:sphere { radius 1.5
		position 0.3 4 6
	}
}

//TODO: per-light ambient, diffuse, specular, etc.?
//TODO: material inheritance?
material "plane_material" {
	action:reflect 0.8 2
	action:shadow "light1" 1
	action:shadow "light2" 1
	action:shadow "light3" 1
	diffuse 0.375 0.375 0.75
	specular 1.0 1.0 1.0
	shininess 300
}

material  "sphere1_material" {
	action:refract 1.0 2
	action:shadow "light1" 1
	action:shadow "light2" 1
	action:shadow "light3" 1
	diffuse 0.0 0.0 0.0
	specular 1.0 1.0 1.0
	index 1.49 8000.0
	shininess 100
}

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
		position 2.3 -0.5 0.5
	}
	object:sphere { use "sphere1_material" radius 0.5
		//position 1 1.4 0.5
		position 1 1.6 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
		position -3.4 -1.6 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
		position -1.2 3.5 0.3
	}
	object:sphere { use "sphere1_material" radius 0.2
		//position 2.3 2.6 0.2
		position 2.3 4.0 0.2
	}
	
	object:plane {
		use "plane_material"
		position 0 0 0
		normal 0 0 1
	}
	object:plane {
		use "plane_material"
		//position 0 -1.5 0
		position 0 -4.0 0
		normal 0 1 0
	}
}
















