I am very new to cuda and dont have long to figure this out
__global__ void d_render(uchar4* d_output, uint width, uint height) {
uint x = blockIdx.x * blockDim.x + threadIdx.x;
uint y = blockIdx.y * blockDim.y + threadIdx.y;
uint i = y * width + x;
float u = x / (float)width;
float v = y / (float)width;
u = 2.0 * u - 1.0;
v = -(2.0 * v - 1.0);
if ((x < width) && (y < height)) {
d_output[i] = make_uchar4(0, 0, 0, 0);
}
}
I have the code above which creates a plain black image, how would I, using the u and v pixel coordinates, draw a large red circle in the center of the image? Thank you so much in advance