Please read the OptiX Programming Guide chapter I linked to above again. Some of your questions are already answered in that. I will only answer the remaining ones.
How about the corresponding albedo image. Does it need to be gamma corrected as well?
That’s a good questions. It’s not mentioned inside the programming guide. That should always be in linear space.
It would be better for our code if gamma correction can happen after denoising but if doing it the other way is better for denoising then I’ll make the effort to change that.
Then do not use the LDR denoiser, use the HDR denoiser which works in linear color space. There actually isn’t a separate AI network for the LDR denoiser inside OptiX versions for quite some time anyway.
Please have a look into other posts about the OptiX denoiser here:
https://forums.developer.nvidia.com/search?q=Denoiser
- For optixDenoiserComputeMemoryResources() method, I’m only passing in the width and height of the framebuffer. It doesn’t seem to care about the 3rd dimension (i.e. color channels)?
Right, that calculates internal scratch memory sizes which depend on the model and options which are part of the denoiser handle created with optixDenoiserCreate and the input dimensions.
Please follow the examples inside the programming guide
https://raytracing-docs.nvidia.com/optix7/guide/index.html#ai_denoiser#allocating-denoiser-memory
and the optixDenoiser SDK example or the open-source examples you find in the sticky posts of this sub-forum.
- If I choose to use CUDA driver api instead of CUDA runtime api, does that mean our customer will not need to install the CUDA 11.3 toolkit?
Running OptiX applications does not require the installation of the CUDA Toolkit on the target system!
That is mentioned inside all OptiX SDK Release Notes.
If you’re using the CUDA runtime API and link dynamically you need to ship the resp. CUDA version’s runtime DLL with your application. If you’re linking it statically it’s part of the executable.
If you use the CUDA driver API you always link dynamically and the DLL ships with the display driver.
You would only need a CUDA development environment (the CUDA toolkit) and host compiler on the target system if you do anything with the CUDA Compiler (NVCC) at runtime, like generating CUDA program code in some material editor and compiling it to PTX input source for OptiX, but that in turn can be handled with the CUDA Runtime Compiler NVRTC which can be shipped as two DLLs (compiler and built-ins). Though that would need the CUDA headers, which implies a CUDA toolkit installation on the target system when compiling things at runtime.
Again, no CUDA Toolkit required on the target system whatsoever. OptiX 7 is a header only API and the implementation ships with the display drivers. The input language is PTX you can compile upfront and must be shipped with your application. The necessary DLLs for the CUDA runtime environment, when you use any, also need to be shipped with your application. The customer only needs to have a display driver version installed which supports the OptiX 7 API version you used to build your application.