OidnDenoiser

The Open Image Denoise `rt` network in our own compute shaders: the quality denoiser (rendering-revamp §RVR-7, ruling R11).

In the namespace construct::denoise. Declared in src/libs/libconstruct/construct/denoise/OidnDenoiser.hpp.

Detailed description

It runs OidnNetwork::layers() with the weights of OidnWeights::builtIn() over the tiles of oidnTiles(): for each tile the input process (`oidn_input.comp`), the 16 convolutions (`oidn_conv.comp`, `oidn_conv_pool.comp`) and the output process (`oidn_output.comp`), and before the first tile the automatic input scale (`oidn_exposure.comp`). The tensors hold 16-bit floats, two channels to a word; the weights and the sums are 32-bit. OidnNetwork.hpp holds the CPU reference that the GPU is checked against.

The work of one denoise is a list of steps, one compute dispatch each. denoise() records them all into one command buffer. A host that keeps each submission under a budget (§GTR-D1) calls begin() once, then recordSteps() over several frames, and reads output() when the last step is recorded. The inputs must not change between the steps.

It needs compute, storage buffers, and an RGBA32F or RGBA16F image that a compute shader writes. Without them denoise() returns null, and lastError() says why.

In this section