Beispiel #1
0
func Render(world *scene.Scene, w, h uint32, canvas *image.RGBA) {
	for {

		log.Println("Starting tracing rays")
		world.Lock()
		//generate principal ray(s)
		principalRays := getPrincipalRays(world, w, h)
		//intersect ray(s)
		intersect(world, principalRays, canvas)
		//get color
		world.Unlock()
		log.Println("Done tracing rays")
		break
	}
	return
}