Struct ComputeHitResult
Represents the result of a compute-based hit test, including the intersected triangle index, surface normal, and hit position.
public struct ComputeHitResult
- Inherited Members
Remarks
This structure is typically used to convey the outcome of a ray or collision query performed on a mesh or geometry using compute shaders. The fields provide information about the specific triangle that was hit, as well as the normal and position at the intersection point. The structure is laid out explicitly for interoperability with native or GPU code. The distance to the hit point is stored in the normal's w component.
Fields
Normal
public Vector4 Normal
Field Value
Position
public Vector4 Position
Field Value
TriangleIndex
public int TriangleIndex