A virtual device for testing sunglasses