Optix 7 denoiser with vulkan RTX image format

I am working on an renderer using VK_NV_ray_tracing extension for pathtracing. In order to denoise the result, I am using Optix 7 Denoiser interoperability with Vulkan, as shown in the example (https://github.com/nvpro-samples/vk_denoise). The swapchain is using an image format VK_FORMAT_R8G8B8A8_SNORM, so in order to make the denoiser working, I am blitting the image in a buffer allocated specifically for the denoiser with format VK_FORMAT_R32G32B32A32_SFLOAT to output in another buffer with the same format, before blitting back to swapchain.
This produces a lot of intermediary operations and memory use, and it will be worse if I add intermediary buffers for albedo and normal buffer (those are computed as Gbuffers using vulkan rasterization for an hybrid rendering, they have the same format as swapchain).
So I was wondering if it was possible to take another VkFormat as input for the denoiser. I tried it, but the resulting output where not working at all.

Hi Altann,

The OptiX denoiser formats can be found here: https://raytracing-docs.nvidia.com/optix7/guide/index.html#ai_denoiser#nvidia-ai-denoiser

There is no explicit support for Vulkan formats at all, but VK_FORMAT_R32G32B32A32_SFLOAT happens match OPTIX_PIXEL_FORMAT_FLOAT4.

There are 3 alternative choices of format for the OptiX denoiser input:


I don’t know which Vulkan formats match those, but if I had to guess, I would guess these might work:



Right, but note that three-component formats aren’t generally supported for all use cases on NVIDIA GPUs.
You can find a list of supported formats on http://gpuinfo.org

Thanks for the informations, so I guess there is no way to use the VK_FORMAT_R8G8B8A8_SNORM directly, I will stick with the blitting operations then.