     int circleIndex, 
     float2 pixelCenter, 
     float3 p, 
-    float4* imagePtr) {
+    float4* imagePtr,
+    float rad) {
 
     float diffX = p.x - pixelCenter.x;
     float diffY = p.y - pixelCenter.y;
     float pixelDist = diffX * diffX + diffY * diffY;
 
-    float rad = cuConstRendererParams.radius[circleIndex];;
     float maxDist = rad * rad;
 
     // circle does not contribute to the image

        for (int pixelX=screenMinX; pixelX<screenMaxX; pixelX++) {
            float2 pixelCenterNorm = make_float2(invWidth * (static_cast<float>(pixelX) + 0.5f),
                                                 invHeight * (static_cast<float>(pixelY) + 0.5f));
            shadePixel(index, pixelCenterNorm, p, imgPtr);
            imgPtr++;
        }
    }

                p = *(float3*)(&cuConstRendererParams.position[index3]);
                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,radiusShared[circleInBlock[i]]);
        }
        // Sync radiusShared to prevent the data to be modified in a new iteration
        __syncthreads();
    }
    *(float4*)(&cuConstRendererParams.imageData[offset]) = imgPtr;
}
