Describes the input information for sending a ray intersection command.
Since: 6.0.0(20)
Related module: XEngine
Header file: xeg_vulkan_rt_reflection.h
| Name | Description |
|---|---|
| XEG_StructureType sType | Identifies the XEG_StructureType value of this structure, which must be XEG_STRUCTURE_TYPE_RT_REFLECTION_DESCRIPTION. |
| const void * pNext | Pointer to the extension structure. |
| VkImageView inputRayOriginImage | Ray origin image, which cannot be empty. The format must be the float type of at least three channels. The RGB channels store the X, Y, and Z coordinates of the origin respectively. |
| VkImageView inputRayDirectionImage | Light direction image, which cannot be empty. The format must be the float type of at least three channels. The RGB channels store the X, Y, and Z coordinates of the direction respectively. If the format is signed float, no special processing is required. If the format is unsigned float, the direction information needs to be quantized in the following manner: direction = (direction + 1.0) / 2.0. |
| VkImageView outputReflectionInfoImage | Intersection result of the output reflected rays. The format must be R32G32B32A32_UINT. The intersection result packs the latest hit information of ray tracing into 128 bits. For details about the parsing method, see the description of outputReflectionInfoImage in the structure member variable description. |
| VkAccelerationStructureKHR accelerationStructure | Ray-traced acceleration structure of the scene. |
| float rayMin | Minimum distance between the start point of a light ray and the nearest possible intersection point. The value must be non-negative and less than or equal to that of rayMax. |
| float rayMax | Maximum distance between the start point of a light ray and the farthest possible intersection point. Any intersection beyond this range will be ignored. |
| uint32_t reflectionCullMask | Configures the rayFlags and cullMask parameters in the rayQueryInitializeEXT function. The upper 24 bits indicate rayFlags, and the lower 8 bits indicate cullMask. |
VkAccelerationStructureKHR XEG_RTReflectionDescription::accelerationStructure
Description
Ray-traced acceleration structure of the scene.
VkImageView XEG_RTReflectionDescription::inputRayDirectionImage
Description
Light direction image, which cannot be empty. The format must be the float type of at least three channels. The RGB channels store the X, Y, and Z coordinates of the direction respectively. If the format is signed float, no special processing is required. If the format is unsigned float, the direction information needs to be quantized in the following manner: direction = (direction + 1.0) / 2.0.
VkImageView XEG_RTReflectionDescription::inputRayOriginImage
Description
Ray origin image, which cannot be empty. The format must be the float type of at least three channels. The RGB channels store the X, Y, and Z coordinates of the origin respectively.
VkImageView XEG_RTReflectionDescription::outputReflectionInfoImage
Description
Intersection result of the output reflected rays. The format must be R32G32B32A32_UINT. The intersection result packs the latest hit information of ray tracing into 128 bits. The parsing method is as follows:
uint raymiss = outputReflectionInfoImage.x & 1; uint primitiveId = (outputReflectionInfoImage.x >> 1) & (0x3ffff); uint instanceId = outputReflectionInfoImage.x >> 19; vec2 barycentrics = unpackHalf2x16(outputReflectionInfoImage.z); float hitT = uintBitsToFloat(outputReflectionInfoImage.w); uint sbtOffset = (outputReflectionInfoImage.y >> 16); uint geometryIndex = (outputReflectionInfoImage.y) & 0xffff;
const void* XEG_RTReflectionDescription::pNext
Description
Pointer to the extension structure.
float XEG_RTReflectionDescription::rayMax
Description
Maximum distance between the start point of a light ray and the farthest possible intersection point. Any intersection beyond this range will be ignored.
float XEG_RTReflectionDescription::rayMin
Description
Minimum distance between the start point of a light ray and the nearest possible intersection point. The value must be non-negative and less than or equal to that of rayMax.
uint32_t XEG_RTReflectionDescription::reflectionCullMask
Description
Configures the rayFlags and cullMask parameters in the rayQueryInitializeEXT function. The upper 24 bits indicate rayFlags, and the lower 8 bits indicate cullMask.
XEG_StructureType XEG_RTReflectionDescription::sType
Description
Identifies the XEG_StructureType value of this structure, which must be XEG_STRUCTURE_TYPE_RT_REFLECTION_DESCRIPTION.