RayGeometryIndexKHR(3)

# RayGeometryIndexKHR(3) Manual Page

## Name

RayGeometryIndexKHR - Geometry index in a ray shader

Loading… please wait.

## Description

`RayGeometryIndexKHR`

  A variable decorated with the `RayGeometryIndexKHR` decoration will contain the geometry index for the acceleration structure geometry currently being shaded.

Valid Usage

- VUID-RayGeometryIndexKHR-RayGeometryIndexKHR-04345
  The `RayGeometryIndexKHR` decoration must be used only within the `IntersectionKHR`, `AnyHitKHR`, or `ClosestHitKHR` `Execution` `Model`

- VUID-RayGeometryIndexKHR-RayGeometryIndexKHR-04346
  The variable decorated with `RayGeometryIndexKHR` must be declared using the `Input` `Storage` `Class`

- VUID-RayGeometryIndexKHR-RayGeometryIndexKHR-04347
  The variable decorated with `RayGeometryIndexKHR` must be declared as a scalar 32-bit integer value

## See Also

No cross-references are available

## 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 2014-2025 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0