NVIDIAGameWorks / RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
Other
507 stars 46 forks source link

Is NRD limited to 16 bits float textures? #83

Open StudenteChamp2 opened 1 week ago

StudenteChamp2 commented 1 week ago

From NRD.hlsli:

    // X => IN_DIFF_RADIANCE_HITDIST
    // X => IN_SPEC_RADIANCE_HITDIST
    float4 RELAX_FrontEnd_PackRadianceAndHitDist( float3 radiance, float hitDist, bool sanitize )
    {
      if( sanitize )
        {
          radiance = _NRD_IsInvalid( radiance ) ? float3( 0, 0, 0 ) : clamp( radiance, 0, NRD_FP16_MAX );
          hitDist = _NRD_IsInvalid( hitDist ) ? 0 : clamp( hitDist, 0, NRD_FP16_MAX );
        }

     return float4( radiance, hitDist );
    }

What will happen if i use 32 bits float textures?

dzhdanNV commented 1 week ago

What will happen if i use 32 bits float textures?

You can use FP32 if your radiance passed to NRD <= NRD_FP16_MAX.

Is NRD limited to 16 bits float textures?

Internal processing for radiance is FP16. But when creating NRD resources, including internal ones, you can replace RGBA16f to RGBA32f without problems. It can be done by modifying g_NRD_NrdToNriFormat, if you use the NRD integration layer.

StudenteChamp2 commented 6 days ago

Exellent thank you <3