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
-
commandBufferis the command buffer into which the command will be recorded. -
pRaygenShaderBindingTableis the strided buffer range that holds the shader binding table data for the ray generation shader stage. -
pMissShaderBindingTableis the strided buffer range that holds the shader binding table data for the miss shader stage. -
pHitShaderBindingTableis the strided buffer range that holds the shader binding table data for the hit shader stage. -
pCallableShaderBindingTableis the strided buffer range that holds the shader binding table data for the callable shader stage. -
widthis the width of the ray trace query dimensions. -
heightis height of the ray trace query dimensions. -
depthis 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.