     __shared__ uint scanOutput[THREADS_PER_BLK];
     __shared__ uint scanScratch[2 * THREADS_PER_BLK];
     __shared__ int circleInBlock[THREADS_PER_BLK];
+    //__shared__ float4 imgDataBlock[THREADS_PER_BLK];
 
     int imageX = blockIdx.x * blockDim.x + threadIdx.x;
     int imageY = blockIdx.y * blockDim.y + threadIdx.y;

    if (imageX >= width || imageY >= height)
        return;

    int offset = 4 * (imageY * width + imageX);
    float4* imgPtr = (float4*)(&cuConstRendererParams.imageData[offset]);

    float invWidth = 1.f / width;
    float invHeight = 1.f / height;

                float3 p = *(float3*)(&cuConstRendererParams.position[index3]);
                float2 pixelCenterNorm = make_float2(invWidth * (static_cast<float>(imageX) + 0.5f),
                                                     invHeight * (static_cast<float>(imageY) + 0.5f));
                shadePixel(circleInBlock[i]+thread_iter,pixelCenterNorm, p, &imgPtr);
        }
    }
    *(float4*)(&cuConstRendererParams.imageData[offset]) = imgPtr;
    //if (!threadIdx.x and !threadIdx.y){
    //    image[];
    //}
}


