Ahjo.Vulkan.Ngx 0.19.0

dotnet add package Ahjo.Vulkan.Ngx --version 0.19.0
                    
NuGet\Install-Package Ahjo.Vulkan.Ngx -Version 0.19.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ahjo.Vulkan.Ngx" Version="0.19.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ahjo.Vulkan.Ngx" Version="0.19.0" />
                    
Directory.Packages.props
<PackageReference Include="Ahjo.Vulkan.Ngx" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ahjo.Vulkan.Ngx --version 0.19.0
                    
#r "nuget: Ahjo.Vulkan.Ngx, 0.19.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ahjo.Vulkan.Ngx@0.19.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ahjo.Vulkan.Ngx&version=0.19.0
                    
Install as a Cake Addin
#tool nuget:?package=Ahjo.Vulkan.Ngx&version=0.19.0
                    
Install as a Cake Tool

Ahjo.Vulkan.Ngx

NVIDIA DLSS Super Resolution and DLAA for Ahjo.Vulkan, over the raw bindings in Ahjo.Vulkan.Ngx.Native.

using Ahjo.Vulkan;
using Ahjo.Vulkan.Ngx;

var description = new NgxDescription
{
    ProjectId     = "a0f57b54-1daf-4934-90ae-c4035c19df04", // your own GUID
    EngineVersion = "1.0.0",
};

using NgxContext ngx = NgxContext.Create(device, description);

DlssOptimalSettings settings = ngx.GetOptimalSettings(3840, 2160, DlssQualityMode.MaxQuality);
if (!settings.IsAvailable) return;                      // that mode is not offered here

using var color  = NgxImage.CreateView(device, colorImage,  new ImageViewDescription { Aspect = VkImageAspectFlagBits.VK_IMAGE_ASPECT_COLOR_BIT });
// …depth, motion vectors, output the same way

using DlssFeature dlss = ngx.CreateDlss(ref setupRecorder, new DlssFeatureDescription
{
    RenderWidth  = settings.RenderWidth, RenderHeight = settings.RenderHeight,
    OutputWidth  = 3840,                 OutputHeight = 2160,
    Mode         = DlssQualityMode.MaxQuality,
    Flags        = DlssFeatureFlags.MotionVectorsLowRes | DlssFeatureFlags.DepthInverted,
});
// submit setupRecorder and WAIT before the first Evaluate — CreateDlss records init work.

dlss.Evaluate(ref recorder, new DlssEvaluateInputs
{
    Color = color, Depth = depth, MotionVectors = motionVectors, Output = output,
    JitterOffsetX = jitterX, JitterOffsetY = jitterY,
    RenderWidth = settings.RenderWidth, RenderHeight = settings.RenderHeight,
});

Evaluate allocates nothing per frame.

This package does not contain DLSS

It ships no native files at all — the ahjo_ngx shim rides in Ahjo.Vulkan.Ngx.Native, and the feature DLL is yours. nvngx_dlss.dll (Windows) and libnvidia-ngx-dlss.so.<version> (Linux) are NVIDIA's, covered by the NVIDIA RTX SDKs licence: download them from NVIDIA/DLSS (lib/<plat>/rel/, never dev/ — that build carries an on-screen watermark) and place the file beside your executable or point NgxDescription.DlssSearchPaths at it.

Without it, NgxContext.Create throws NgxFeatureLibraryNotFoundException naming the expected file and every directory searched. There is no silent fallback, and there is no software path: DLSS runs inside the NVIDIA display driver.

Which features a context insists on. NgxDescription.RequiredFeatures (default NgxFeatures.SuperResolution) lists the features NgxContext.Create requires. It probes every feature, but throws only for an unavailable one listed there. An unlisted one reports itself through IsSuperSamplingAvailable / IsFrameGenerationAvailable, and its create call throws the same diagnosed exception later. So a renderer that offers DLSS Frame Generation only where it works keeps the default and reads IsFrameGenerationAvailable. Frame Generation needs a second NVIDIA file, nvngx_dlssg.dll / libnvidia-ngx-dlssg.so.<version>, supplied the same way as nvngx_dlss.dll. The NgxSupport queries take an NgxFeature; a renderer using both features creates its instance and device with the union of both extension sets. See docs/ngx-frame-generation-notes.md.

The full consumer contract — where to get the DLL, the NVIDIA licence obligations that land on your application, and the renderer conventions (jitter sign, motion-vector direction and space, mip bias, Reset, image layouts) that this wrapper cannot check — is docs/ngx-notes.md. samples/HelloDlaa is a worked call site for all of it.

Three contracts the wrapper holds, and one it cannot

  • The view/image/range triple cannot disagree. NgxImage.CreateView builds the view and the subresource range from one ImageViewDescription; NgxImage.Wrap borrows a view you already have and takes the description that made it. Nothing can recover a VkImageView's range after the fact, so Wrap's contract is the one thing you must get right yourself.
  • ReadWrite is not part of the API. The wrapper sets it from the slot — false for every input, true for Output — so "read-write on an image with no VK_IMAGE_USAGE_STORAGE_BIT" is not a sentence you can say. The usage bits themselves are checked under AhjoValidation.Enabled.
  • Image layout is yours. Inputs must be in a shader-read layout and the output in VK_IMAGE_LAYOUT_GENERAL before Evaluate, which must be recorded outside any BeginRendering scope. Ahjo.Vulkan deliberately does not track layout (issue #17), so the wrapper cannot check this — enable VK_LAYER_KHRONOS_validation, which does.

Give the output image ImageUsage.Storage | ImageUsage.TransferDst: DLSS binds it as a storage image and clears it itself with vkCmdClearColorImage, which needs the transfer bit. That second half is not in NVIDIA's headers — the validation layer is what says so.

Rebind after Evaluate. NGX clobbers the command buffer's bound pipeline, descriptor sets and dynamic state. CommandRecorder caches none of that, so there is nothing for the wrapper to invalidate — but you must rebind before the next draw or dispatch.

Not thread safe. The NGX API is not; neither is NgxContext. Under AhjoValidation.Enabled a re-entrancy guard says so rather than corrupting the parameter map.

Frame generation

DLSS Frame Generation (RTX 40-series or newer, plus nvngx_dlssg.dll) is a second feature on the same NgxContext:

if (ngx.IsFrameGenerationAvailable)
{
    using DlssFrameGenerationFeature fg = ngx.CreateFrameGeneration(ref setupRecorder, new DlssFrameGenerationDescription
    {
        Width = 1920, Height = 1080, BackbufferFormat = VkFormat.VK_FORMAT_R8G8B8A8_UNORM, // UNORM, never _SRGB
        RenderWidth = 1920, RenderHeight = 1080,
    });
    // submit setupRecorder and WAIT before the first Evaluate.

    fg.Evaluate(ref recorder, new DlssFrameGenerationInputs
    {
        Backbuffer = backbuffer, Depth = depth, MotionVectors = motionVectors,
        Hudless = hudless, UiColorAndAlpha = ui,
        OutputInterpolated = generated, OutputReal = real,
        Camera = camera,                   // unjittered matrices
        BackbufferFrameId = frameId,
    });
}

Evaluate allocates nothing per frame, and presents nothing: it writes the generated frame into your image, and presenting it — twice per rendered frame, paced — is the application's job. FG's jitter is in clip space, not Super Resolution's render pixels. The consumer contract, including what is still being measured, is docs/ngx-frame-generation-notes.md.

Requirements

NVIDIA hardware with a DLSS-capable driver, win-x64 or linux-x64, and the feature DLL above. Ahjo.Vulkan takes no dependency on this package.

Part of Ahjo.Vulkan. MIT licensed — the NVIDIA licence obligations that come with the feature DLL are yours.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.19.0 102 11/29/2026
0.18.1-alpha.0.6 64 11/29/2026
0.18.1-alpha.0.5 64 11/28/2026
0.18.1-alpha.0.4 62 11/28/2026
0.18.1-alpha.0.3 68 11/25/2026
0.18.1-alpha.0.2 89 11/13/2026
0.18.1-alpha.0.1 67 11/13/2026
0.18.0 131 11/13/2026
0.17.1-alpha.0.17 82 11/13/2026
0.17.1-alpha.0.16 80 11/13/2026
0.17.1-alpha.0.15 70 11/13/2026
0.17.1-alpha.0.14 71 11/13/2026
0.17.1-alpha.0.13 74 11/13/2026
0.17.1-alpha.0.12 70 11/13/2026
0.17.1-alpha.0.11 76 11/13/2026
0.17.1-alpha.0.10 73 11/13/2026
0.17.1-alpha.0.9 74 11/9/2026
0.17.1-alpha.0.8 74 11/6/2026
0.17.1-alpha.0.7 75 11/6/2026
0.17.1-alpha.0.6 73 11/6/2026
Loading failed