optixDenoiserInvoke pixel format

Hi there,

as optixDenoiserInvoke does not support OPTIX_PIXEL_FORMAT_UCHAR3(4) I need to use OPTIX_PIXEL_FORMAT_FLOAT3(4). Right?
Is there any function provided by CUDA or Optix SDK which allows me to transfer from an UCHAR device buffer to FLOAT device buffer? Do I have to do this on my own?


Right, UCHAR3 and UCHAR4 pixel formats are not supported by the OptiX denoiser.

The OptiX Release Notes mention it and the online OptiX Programming Guide does not list the enums at all because of that, but they are still contained inside the OptixPixelFormat but using them will throw an unsupported error.

You would have to do this conversion yourself. You could simply implement a native CUDA kernel which does that operation.
If both buffers are on the device already and have the same dimensions, that should be straightforward.

I would also try the half format for better efficiency.

PS: Note that OptiX 7.1.0 has been released yesterday!
That changed one structure related to the denoiser to be able to get the required memory and the required overlap in pixels when implementing tiled denoising with a single call now. Also the OptiX denoiser performance has been increased.
That strictly requires the new R450 display drivers.

Thank you droettger for your quick answer. Download of 7.1.0 and R451 is ready ;-)

I’m a NOOB in terms of Optix and not well experienced in CUDA at all.
Can you explain in short the ‘half format’? Nvidia docu is not a great help…

When looking at the OptiX SDK 7.1.0 examples we’ve noticed that the newly added optixDenoiser example had not been added to the OptiX SDK 7.1.0\SDK\CMakeLists.txt which includes all the other examples.
There needs to be a line add_subdirectory( optixDenoiser ) added after line 380.

The floating point formats are standardized in the IEEE 754 specs.
The 32-bit single precision floating point format is 1 bit sign, 8 bits exponent, 23 bit mantissa while
the 16-bit half precision floating point format is 1 bit sign, 5 bits exponent, 10 bits mantissa.

Means the half format uses half the memory (2 bytes instead of 4 bytes) and has a much smaller value range and precision. Also mind the different bias for the exponent.
It’s normally precise enough for HDR images in computer graphics and is used for many years as texture format or inside the OpenEXR image file format.

Please find more information here:

1 Like