C Specification
To dispatch ray tracing use:
void vkCmdTraceRaysKHR(
VkCommandBuffer commandBuffer,
const VkStridedBufferRegionKHR* pRaygenShaderBindingTable,
const VkStridedBufferRegionKHR* pMissShaderBindingTable,
const VkStridedBufferRegionKHR* pHitShaderBindingTable,
const VkStridedBufferRegionKHR* pCallableShaderBindingTable,
uint32_t width,
uint32_t height,
uint32_t depth);
Parameters
-
commandBuffer
is the command buffer into which the command will be recorded. -
pRaygenShaderBindingTable
is the strided buffer range that holds the shader binding table data for the ray generation shader stage. -
pMissShaderBindingTable
is the strided buffer range that holds the shader binding table data for the miss shader stage. -
pHitShaderBindingTable
is the strided buffer range that holds the shader binding table data for the hit shader stage. -
pCallableShaderBindingTable
is the strided buffer range that holds the shader binding table data for the callable shader stage. -
width
is the width of the ray trace query dimensions. -
height
is height of the ray trace query dimensions. -
depth
is depth of the ray trace query dimensions.
Description
When the command is executed, a ray generation group of width
× height
× depth
rays is assembled.
Document Notes
For more information, see the Vulkan Specification
This page is extracted from the Vulkan Specification. Fixes and changes should be made to the Specification, not directly.
Copyright
Copyright (c) 2014-2020 Khronos Group. This work is licensed under a Creative Commons Attribution 4.0 International License.