# HitKindKHR(3) Manual Page

## Name

HitKindKHR - Kind of hit that triggered an any-hit or closest hit ray shader

Loading… please wait.

## Description

`HitKindKHR`

  A variable decorated with the `HitKindKHR` decoration will describe the intersection that triggered the execution of the current shader. The values are determined by the intersection shader. For user-defined intersection shaders this is the value that was passed to the “Hit Kind” operand of `OpReportIntersectionKHR`. For triangle intersection candidates, this will be one of `HitKindFrontFacingTriangleKHR` or `HitKindBackFacingTriangleKHR`.

Valid Usage

- VUID-HitKindKHR-HitKindKHR-04242
  The `HitKindKHR` decoration must be used only within the `AnyHitKHR` or `ClosestHitKHR` `Execution` `Model`

- VUID-HitKindKHR-HitKindKHR-04243
  The variable decorated with `HitKindKHR` must be declared using the `Input` `Storage` `Class`

- VUID-HitKindKHR-HitKindKHR-04244
  The variable decorated with `HitKindKHR` 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-2024 The Khronos Group Inc.

SPDX-License-Identifier: CC-BY-4.0