// d3d12umddi.h
typedef struct D3D12DDI_HIT_GROUP_DESC_0054 {
LPCWSTR HitGroupExport;
D3D12DDI_HIT_GROUP_TYPE Type;
LPCWSTR AnyHitShaderImport;
LPCWSTR ClosestHitShaderImport;
LPCWSTR IntersectionShaderImport;
D3D12DDI_EXPORT_SUMMARY_FLAGS SummaryFlags;
} D3D12DDI_HIT_GROUP_DESC_0054;
View the official Windows Driver Kit DDI referenceNo description available.
Describes a hit group.
HitGroupExportName of the hit group.
TypeA D3D12DDI_HIT_GROUP_TYPE enumeration that represents the type of hit group.
AnyHitShaderImportThe any hit shader import.
ClosestHitShaderImportClosest hit shader import.
IntersectionShaderImportIntersection shader import.
SummaryFlagsA D3D12DDI_EXPORT_SUMMARY_FLAGS flag that indicates the properties the runtime has determined about the shader export.
A hit group is one or more shaders that consists of:
Individual geometries in a given instance each refer to a hit group to provide their shader code. The point of the grouping is to allow implementations to be able to compile and execute the group as efficiently as rays interacting with geometry
Ray generation shaders and miss shaders aren’t part of hit groups because they aren’t involved directly with geometry.
If a hit group contains an intersection shader, it can only be used with procedural primitive geometry. If a hit group does not contain an intersection shader, it can only be used with triangle geometry.
A hit group with no shaders at all is also possible, by simply using NULL as it’s shader identifier.
An empty hit group can be useful, for example, if the app doesn’t want to do anything for hits and only cares about the miss shader running when nothing has been hit.