     blocksShade.x = 1 + (heightScale/threadsShade.x);
     blocksShade.y = 1 + (widthScale/threadsShade.y);
 
-    Vec3 backgroundColor = {0.3f};
     getErrorCuda((shade<<<blocksShade, threadsShade>>>(heightScale, widthScale, uvxArr, uvyArr, distance,
     lookDirection, camUp, camRight, backgroundColor, cameraLocation, rawR, rawG, rawB)));
 

    cudaMalloc(&uvyArr, (width*scale)*(height*scale) * sizeof(float));
    cudaMalloc(&distance, (width*scale)*(height*scale) * sizeof(float));
    
    cudaMallocManaged(&imageR, width*height * sizeof(float));
    cudaMallocManaged(&imageG, width*height * sizeof(float));
    cudaMallocManaged(&imageB, width*height * sizeof(float));
    
    float max = 0;
    float min = 0;


    dim3 threadsTrace;
    dim3 blocksTrace;

    threadsTrace.x = 8;
    threadsTrace.y = 8;

    blocksTrace.x = 1 + (widthScale/threadsTrace.x);
    blocksTrace.y = 1 + (heightScale/threadsTrace.y);

    getErrorCuda((trace<<<blocksTrace, threadsTrace>>>(heightScale, widthScale, uvxArr, uvyArr, distance, lookDirection, camUp, camRight, cameraLocation)));

    Vec3 backgroundColor = {0.3f};


    // shade
