NVIDIAGameWorks / RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
Other
504 stars 46 forks source link

Consider adding Identifier member to DispatchDesc #73

Closed ch45er closed 8 months ago

ch45er commented 9 months ago

The abstraction of an instance of multiple denoisers is great. I propose a QoL improvement - the addition of an Identifier member to the DispatchDesc structure to tell which denoiser the dispatch is coming from.

This helps in cases when there are multiple denoisers providing semantically identical outputs in the instance.

Say, an application wants to use Reblur for GI and Relax for DI, both within the same instance. Both denoisers write to OUT_DIFF_RADIANCE_HITDIST and OUT_SPEC_RADIANCE_HITDIST. On the application side, those have to be mapped to some textures.

Currently one has to call GetComputeDispatches() twice - once passing the identifier for Reblur (and thus with the knowledge that each OUT_... is for GI data) and once for Relax (so that each OUT_... is for DI data).

With an Identifier in the DispatchDesc it is possible to 1:1 map denoiser outputs to application resources without manually separating the dispatches in bulks of non-ambiguous denoisers.

dzhdanNV commented 9 months ago

Thanks. It's a very good proposal. Looking at the code, I'm not seeing any pitfalls. I will implement this on Monday. It will be included into the next big update. I will try to do the update sooner rather than later (1-2 weeks).

ch45er commented 9 months ago

Good news, looking forward to it!

dzhdanNV commented 9 months ago

Implemented. Auto-injected "clear" dispatches include identifiers too. It will be a part of the upcoming update.

dzhdanNV commented 8 months ago

Implemented in v4.4.0.