vulkan-3.26.1: Bindings to the Vulkan graphics API.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_NV_displacement_micromap

Description

Name

VK_NV_displacement_micromap - device extension

VK_NV_displacement_micromap

Name String
VK_NV_displacement_micromap
Extension Type
Device extension
Registered Extension Number
398
Revision
2
Ratification Status
Not ratified
Extension and Version Dependencies
VK_EXT_opacity_micromap
  • __This is a provisional extension and must be used with caution. See the description of provisional header files for enablement and stability details.__
Contact

Other Extension Metadata

Last Modified Date
2023-03-17
Interactions and External Dependencies
TBD
Contributors
  • Christoph Kubisch, NVIDIA
  • Eric Werness, NVIDIA

Description

Ray tracing can very efficiently render from geometry which has very fine detail, but when using only a basic triangle representation, memory consumption can be an issue. This extension adds the ability to add a displacement map to add more detail to triangles in an acceleration structure with an efficient in-memory format. The format is externally visible to allow the application to compress its internal geometry representations into the compressed format ahead of time. This format adds displacements along a defined vector to subtriangle vertices which are subdivided from the main triangles.

This extension provides:

New Structures

New Enums

New Enum Constants

Issues

  1. What is the status of this extension?
  • Provisional and expected to change. The broad structure and encoding format are stable, but there will likely be changes to the structures, enumerant values, and shader interface.

Version History

  • Revision 1, 2023-03-17 (Eric Werness)

    • Initial public revision
  • Revision 2, 2023-07-07 (Eric Werness)

    • Add shader support for decode intrinsics

See Also

AccelerationStructureTrianglesDisplacementMicromapNV, DisplacementMicromapFormatNV, PhysicalDeviceDisplacementMicromapFeaturesNV, PhysicalDeviceDisplacementMicromapPropertiesNV

Document Notes

For more information, see the Vulkan Specification

This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.

Synopsis

Documentation

data PhysicalDeviceDisplacementMicromapFeaturesNV Source #

VkPhysicalDeviceDisplacementMicromapFeaturesNV - Structure describing the ray tracing displacement micromap features that can be supported by an implementation

Members

This structure describes the following feature:

Description

If the PhysicalDeviceDisplacementMicromapFeaturesNV structure is included in the pNext chain of the PhysicalDeviceFeatures2 structure passed to getPhysicalDeviceFeatures2, it is filled in to indicate whether each corresponding feature is supported. PhysicalDeviceDisplacementMicromapFeaturesNV can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_NV_displacement_micromap, Bool32, StructureType

Constructors

PhysicalDeviceDisplacementMicromapFeaturesNV 

Fields

  • displacementMicromap :: Bool

    displacementMicromap indicates whether the implementation supports the displacement micromap feature.

Instances

Instances details
Storable PhysicalDeviceDisplacementMicromapFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Show PhysicalDeviceDisplacementMicromapFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Eq PhysicalDeviceDisplacementMicromapFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

FromCStruct PhysicalDeviceDisplacementMicromapFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

ToCStruct PhysicalDeviceDisplacementMicromapFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Zero PhysicalDeviceDisplacementMicromapFeaturesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

data PhysicalDeviceDisplacementMicromapPropertiesNV Source #

VkPhysicalDeviceDisplacementMicromapPropertiesNV - Structure describing the displacement micromap properties of a physical device

Description

If the PhysicalDeviceDisplacementMicromapPropertiesNV structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

Valid Usage (Implicit)

See Also

VK_NV_displacement_micromap, StructureType

Constructors

PhysicalDeviceDisplacementMicromapPropertiesNV 

Fields

Instances

Instances details
Storable PhysicalDeviceDisplacementMicromapPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Show PhysicalDeviceDisplacementMicromapPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Eq PhysicalDeviceDisplacementMicromapPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

FromCStruct PhysicalDeviceDisplacementMicromapPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

ToCStruct PhysicalDeviceDisplacementMicromapPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Zero PhysicalDeviceDisplacementMicromapPropertiesNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

data AccelerationStructureTrianglesDisplacementMicromapNV Source #

VkAccelerationStructureTrianglesDisplacementMicromapNV - Structure specifying a displacement micromap in a bottom-level acceleration structure

Description

If AccelerationStructureTrianglesDisplacementMicromapNV is included in the pNext chain of a AccelerationStructureGeometryTrianglesDataKHR structure, that geometry will reference that micromap.

For each triangle in the geometry, the acceleration structure build fetches an index from indexBuffer using indexType and indexStride. That triangle uses the displacement micromap information from micromap at that index plus baseTriangle.

Only one of pUsageCounts or ppUsageCounts can be a valid pointer, the other must be NULL. The elements of the non-NULL array describe the total count used to build this geometry. For a given format and subdivisionLevel the number of triangles in this geometry matching those values after indirection must be equal to the sum of matching count provided.

Valid Usage

  • Only one of pUsageCounts or ppUsageCounts can be a valid pointer, the other must be NULL

Valid Usage (Implicit)

  • displacementBiasAndScaleFormat must be a valid Format value
  • displacementVectorFormat must be a valid Format value
  • indexType must be a valid IndexType value
  • If usageCountsCount is not 0, and pUsageCounts is not NULL, pUsageCounts must be a valid pointer to an array of usageCountsCount MicromapUsageEXT structures
  • If usageCountsCount is not 0, and ppUsageCounts is not NULL, ppUsageCounts must be a valid pointer to an array of usageCountsCount valid pointers to MicromapUsageEXT structures
  • If micromap is not NULL_HANDLE, micromap must be a valid MicromapEXT handle

See Also

VK_NV_displacement_micromap, DeviceOrHostAddressConstKHR, DeviceSize, Format, IndexType, MicromapEXT, MicromapUsageEXT, StructureType

Constructors

AccelerationStructureTrianglesDisplacementMicromapNV 

Fields

newtype DisplacementMicromapFormatNV Source #

VkDisplacementMicromapFormatNV - Format enum for displacement micromaps

Description

Note

For compactness, these values are stored as 16-bit in some structures.

See Also

VK_NV_displacement_micromap

Bundled Patterns

pattern DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV :: DisplacementMicromapFormatNV

DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV indicates that the given micromap format encodes 64 micro-triangles worth of displacements in 64 bytes as described in Displacement Micromap Encoding.

pattern DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV :: DisplacementMicromapFormatNV

DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV indicates that the given micromap format encodes 256 micro-triangles worth of displacements in 128 bytes as described in Displacement Micromap Encoding.

pattern DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV :: DisplacementMicromapFormatNV

DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV indicates that the given micromap format encodes 1024 micro-triangles worth of displacements in 128 bytes as described in Displacement Micromap Encoding.

Instances

Instances details
Storable DisplacementMicromapFormatNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Read DisplacementMicromapFormatNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Show DisplacementMicromapFormatNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Eq DisplacementMicromapFormatNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Ord DisplacementMicromapFormatNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

Zero DisplacementMicromapFormatNV Source # 
Instance details

Defined in Vulkan.Extensions.VK_NV_displacement_micromap

type NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap" Source #

newtype MicromapEXT Source #

Constructors

MicromapEXT Word64 

Instances

Instances details
Storable MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Show MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Eq MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Ord MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

HasObjectType MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

IsHandle MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

Zero MicromapEXT Source # 
Instance details

Defined in Vulkan.Extensions.Handles

data MicromapUsageEXT Source #

VkMicromapUsageEXT - Structure specifying the usage information used to build a micromap

Valid Usage

The format is interpreted based on the type of the micromap using it.

See Also

VK_EXT_opacity_micromap, AccelerationStructureTrianglesDisplacementMicromapNV, AccelerationStructureTrianglesOpacityMicromapEXT, MicromapBuildInfoEXT

Constructors

MicromapUsageEXT 

Fields

  • count :: Word32

    count is the number of triangles in the usage format defined by the subdivisionLevel and format below in the micromap

  • subdivisionLevel :: Word32

    subdivisionLevel is the subdivision level of this usage format

  • format :: Word32

    format is the format of this usage format

Instances

Instances details
Storable MicromapUsageEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Show MicromapUsageEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Eq MicromapUsageEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

FromCStruct MicromapUsageEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

ToCStruct MicromapUsageEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Zero MicromapUsageEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

newtype BuildAccelerationStructureFlagBitsKHR Source #

VkBuildAccelerationStructureFlagBitsKHR - Bitmask specifying additional parameters for acceleration structure builds

Description

Note

BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR and BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR may take more time and memory than a normal build, and so should only be used when those features are needed.

See Also

VK_KHR_acceleration_structure, VK_NV_ray_tracing, BuildAccelerationStructureFlagsKHR

Bundled Patterns

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR indicates that the specified acceleration structure can be updated with a mode of BUILD_ACCELERATION_STRUCTURE_MODE_UPDATE_KHR in AccelerationStructureBuildGeometryInfoKHR or an update of TRUE in cmdBuildAccelerationStructureNV .

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_COMPACTION_BIT_KHR indicates that the specified acceleration structure can act as the source for a copy acceleration structure command with mode of COPY_ACCELERATION_STRUCTURE_MODE_COMPACT_KHR to produce a compacted acceleration structure.

pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_TRACE_BIT_KHR indicates that the given acceleration structure build should prioritize trace performance over build time.

pattern BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_PREFER_FAST_BUILD_BIT_KHR indicates that the given acceleration structure build should prioritize build time over trace performance.

pattern BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_LOW_MEMORY_BIT_KHR indicates that this acceleration structure should minimize the size of the scratch memory and the final result acceleration structure, potentially at the expense of build time or trace performance.

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_DATA_ACCESS_KHR indicates that the specified acceleration structure can be used when fetching the vertex positions of a hit triangle.

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_DISPLACEMENT_MICROMAP_UPDATE_NV indicates that the displacement micromaps associated with the specified acceleration structure may change with an acceleration structure update.

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_DATA_UPDATE_EXT indicates that the data of the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_DISABLE_OPACITY_MICROMAPS_EXT indicates that the specified acceleration structure may be referenced in an instance with GEOMETRY_INSTANCE_DISABLE_OPACITY_MICROMAPS_EXT set.

pattern BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT :: BuildAccelerationStructureFlagBitsKHR

BUILD_ACCELERATION_STRUCTURE_ALLOW_OPACITY_MICROMAP_UPDATE_EXT indicates that the opacity micromaps associated with the specified acceleration structure may change with an acceleration structure update.

pattern BUILD_ACCELERATION_STRUCTURE_MOTION_BIT_NV :: BuildAccelerationStructureFlagBitsKHR 

Instances

Instances details
Storable BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Bits BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Methods

(.&.) :: BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR #

(.|.) :: BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR #

xor :: BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR #

complement :: BuildAccelerationStructureFlagBitsKHR -> BuildAccelerationStructureFlagBitsKHR #

shift :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

rotate :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

zeroBits :: BuildAccelerationStructureFlagBitsKHR #

bit :: Int -> BuildAccelerationStructureFlagBitsKHR #

setBit :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

clearBit :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

complementBit :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

testBit :: BuildAccelerationStructureFlagBitsKHR -> Int -> Bool #

bitSizeMaybe :: BuildAccelerationStructureFlagBitsKHR -> Maybe Int #

bitSize :: BuildAccelerationStructureFlagBitsKHR -> Int #

isSigned :: BuildAccelerationStructureFlagBitsKHR -> Bool #

shiftL :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

unsafeShiftL :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

shiftR :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

unsafeShiftR :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

rotateL :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

rotateR :: BuildAccelerationStructureFlagBitsKHR -> Int -> BuildAccelerationStructureFlagBitsKHR #

popCount :: BuildAccelerationStructureFlagBitsKHR -> Int #

FiniteBits BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Read BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Show BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Eq BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Ord BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

Zero BuildAccelerationStructureFlagBitsKHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_acceleration_structure

newtype MicromapTypeEXT Source #

VkMicromapTypeEXT - Type of micromap

See Also

VK_EXT_opacity_micromap, MicromapBuildInfoEXT, MicromapCreateInfoEXT

Constructors

MicromapTypeEXT Int32 

Bundled Patterns

pattern MICROMAP_TYPE_OPACITY_MICROMAP_EXT :: MicromapTypeEXT

MICROMAP_TYPE_OPACITY_MICROMAP_EXT is a micromap containing data to control the opacity of a triangle.

pattern MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV :: MicromapTypeEXT

MICROMAP_TYPE_DISPLACEMENT_MICROMAP_NV is a micromap containing data to control the displacement of subtriangles within a triangle.

Instances

Instances details
Storable MicromapTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Read MicromapTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Show MicromapTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Eq MicromapTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Ord MicromapTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap

Zero MicromapTypeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_opacity_micromap