NVIDIAGameWorks / RTX-Path-Tracing

Real-time path tracing library and sample
Other
623 stars 67 forks source link

DXR 1.0 or 1.1 is required? #5

Closed ohmaya closed 1 year ago

ohmaya commented 1 year ago

https://developer.nvidia.com/rtx/path-tracing/get-started "DirectX® Raytracing 1.0 API" https://github.com/NVIDIAGameWorks/Path-Tracing-SDK "DirectX Raytracing 1.1 API"

There are 2 macros:

Thanks.

ohmaya commented 1 year ago
if (!deviceManager->GetDevice()->queryFeatureSupport(nvrhi::Feature::RayQuery))
{
    log::fatal("The graphics device does not support Ray Queries");
    return 1;
}
fstrugar-nv commented 1 year ago

Hi! DXR 1.1 is required, it looks like the info on https://developer.nvidia.com/rtx/path-tracing/get-started is incorrect - thank you for noticing, we'll fix it.

ohmaya commented 1 year ago

Hi @fstrugar-nv, thanks.

USE_RAY_QUERY is used in several places. Is it possile to switch to a pure DXR 1.0 implementation? Some engine's shader compiler is not 1.1 ready.

fstrugar-nv commented 1 year ago

It's certainly possible but is slightly less efficient for shadow rays and would require using raygen shaders instead of compute shaders for certain passes. This would make the code sample more complex so we have no plans on doing it - but it's possible!