NVIDIAGameWorks / RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
Other
504 stars 46 forks source link

Mistake in documentation of SIGMA_SHADOW? #69

Closed Nielsbishere closed 11 months ago

Nielsbishere commented 11 months ago

It seems like if I execute sigma without motion vectors I get a crash because it is trying to get the texture of IN_MV even though the documentation in NRDDescs.h says:

// INPUTS - IN_NORMAL_ROUGHNESS, IN_SHADOWDATA, OUT_SHADOW_TRANSLUCENCY (used as history)
// OUTPUTS - OUT_SHADOW_TRANSLUCENCY

I'm guessing this is just a mistake in the documentation? As generally you do want motion vectors for any kind of denoiser.

Nielsbishere commented 11 months ago

Should OUT_SHADOW_TRANSLUCENCY in the inputs also be IN_SHADOW_TRANSLUCENCY?

dzhdanNV commented 11 months ago

Thanks!

I fixed the comments in enum class Denoiser:

    enum class Denoiser : uint32_t
    {
        /*
        IMPORTANT: IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ are used by any denoiser
        These denoisers DON'T use:
            REFERENCE - IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ
            SPECULAR_DELTA_MV - IN_NORMAL_ROUGHNESS, IN_VIEWZ
        */

        <removed IN_MV, IN_NORMAL_ROUGHNESS, IN_VIEWZ from other comments>
    };

Should OUT_SHADOW_TRANSLUCENCY in the inputs also be IN_SHADOW_TRANSLUCENCY?

No. To save memory SIGMA uses the output from the previous frame as the history buffer in the next frame. A recurrent thing.