Class NVXRaytracing

  • public class NVXRaytracing
    extends java.lang.Object
    Rasterization has been the dominant method to produce interactive graphics, but increasing performance of graphics hardware has made raytracing a viable option for interactive rendering. Being able to integrate raytracing with traditional rasterization makes it easier for applications to incrementally add raytraced effects to existing applications or to do hybrid approaches with rasterization for primary visibility and raytracing for secondary queries.

    To enable raytracing, this extension adds a few different categories of new functionality:

    • Acceleration structure objects and build commands
    • A new pipeline type with new shader domains
    • An indirection table to link shader groups with acceleration structure items

    This extension adds support for the following SPIR-V extension in Vulkan:

    • SPV_NVX_raytracing
    Sample Code

    Example ray generation GLSL shader

     #version 450 core
     #extension GL_NVX_raytracing : require
     layout(set = 0, binding = 0, rgba8) uniform image2D image;
     layout(set = 0, binding = 1) uniform accelerationStructureNVX as;
     layout(location = 0) rayPayloadNVX float payload;
     void main()
        vec4 col = vec4(0, 0, 0, 1);
        vec3 origin = vec3(float(gl_LaunchIDNVX.x)/float(gl_LaunchSizeNVX.x), float(gl_LaunchIDNVX.y)/float(gl_LaunchSizeNVX.y), 1.0);
        vec3 dir = vec3(0.0, 0.0, -1.0);
        traceNVX(as, 0, 0xff, 0, 1, 0, origin, 0.0, dir, 1000.0, 0);
        col.y = payload;
        imageStore(image, ivec2(gl_LaunchIDNVX.xy), col);
    Name String
    Extension Type
    Device extension
    Registered Extension Number
    Extension and Version Dependencies
    Last Modified Date
    Interactions and External Dependencies
    • Eric Werness, NVIDIA
    • Ashwin Lele, NVIDIA
    • Robert Stepinski, NVIDIA
    • Nuno Subtil, NVIDIA
    • Christoph Kubisch, NVIDIA
    • Martin Stich, NVIDIA
    • Daniel Koch, NVIDIA