 
 }  // namespace
 
-Image PathTracer::Render(const Camera& camera) {
-  const size_t num_pixels = camera.resolution.x * camera.resolution.y;
+Image PathTracer::Render(const Camera& host_camera) {
+  checkCudaErrors( cudaMemcpyToSymbol(camera, &host_camera, sizeof(Camera)) );
+
+  const size_t num_pixels = host_camera.resolution.x * host_camera.resolution.y;
 
   thrust::device_vector<Triangle> triangles(m_scene.triangles);
   Triangle* const triangles_ptr = thrust::raw_pointer_cast(triangles.data());

    float angle = kTwoPi * curand_uniform(curand_state);
    float distance =
        camera.aperture_radius * sqrt(curand_uniform(curand_state));

    float2 coord = make_float2(cos(angle) * distance, sin(angle) * distance);

    origin += x_axis * coord.x + y_axis * coord.y;
  }

  rays[idx].origin = origin;
  rays[idx].direction = normalize(point - origin);
  rays[idx].color = make_float3(light);
}

__global__ void PathTraceKernel(const Triangle* triangles,

namespace cupt {

namespace {

__constant__ Camera camera;

__device__ inline float3 ComputeReflectionDirection(const float3 normal,
                                                    const float3 incident) {
