Hi,
I have a raycasting project in C++ that uses SFML to render an array of pixels. I set the pixels one by one of an image and then draw it.
Here is what the render loop looks like:
for (uint32_t y = 0; y < height; ++y)
{
for (uint32_t x = 0; x < width; ++x)
{
ray.dir = rayDirections[x + (y * width)];
Vector4f32 color = traceRay(scene, ray);
color = clamp(color, Vector4f32(0.0f), Vector4f32(1.0f));
image.setPixel(x, height - 1 - y, sf::Color(utils::convertToRgba(color)));
}
}
I want to switch from SFML to Vulkan but still keep the computation on the CPU side, so no shaders.
What would be the "Vulkan way" to do this? I found VkImage in the API but I'm not sure about the best practices for using it or even if that's what I should use.
Thanks ! 👍