struct RayQuery<rayFlagsGeneric:uint>
Description
Note: The treatment of the RayQuery type in Slang does not perfectly match its semantics in vanilla HLSL in some corner cases. Specifically, a RayQuery in vanilla HLSL is an opaque handle to mutable storage, and assigning a RayQuery or passing one as a parameter will only copy the handle, potentially resulting in aliasing of the underlying mutable storage.
In contrast, Slang considers a RayQuery to own its mutable state, and (because the API does not support cloning of queries), RayQuery values are non-copyable (aka “move-only”).
The main place where this arises as a consideration is when passing a RayQuery down into a function that will perform mutating operations on it (e.g., TraceRay or Proceed):
void myFunc( inout RayQuery<FLAGS> q )
{
q.Proceed();
}
In Slang, a parameter like q above should be declared inout. HLSL does not care about whether q is declared inout or not.
cannot use a cap for struct with unequal target support since it will propegate rules to children.
Generic Parameters
rayFlagsGeneric : uint = RAY _FLAG _NONE
Methods
- init
- TraceRayInline
- Proceed
- Abort
- CommitNonOpaqueTriangleHit
- CommitProceduralPrimitiveHit
- CandidateType
- CommittedStatus
- CandidateProceduralPrimitiveNonOpaque
- CandidateTriangleRayT
- CommittedRayT
- CandidateRayInstanceCustomIndex
- CommittedRayInstanceCustomIndex
- CandidateRayInstanceId
- CommittedRayInstanceId
- CandidateRayInstanceShaderBindingTableRecordOffset
- CommittedRayInstanceShaderBindingTableRecordOffset
- CandidateRayGeometryIndex
- CommittedRayGeometryIndex
- CandidateRayPrimitiveIndex
- CommittedRayPrimitiveIndex
- CandidateRayBarycentrics
- CommittedRayBarycentrics
- CandidateRayFrontFace
- CommittedRayFrontFace
- CandidateRayObjectRayDirection
- CommittedRayObjectRayDirection
- CandidateRayObjectRayOrigin
- CommittedRayObjectRayOrigin
- CandidateRayObjectToWorld
- CommittedRayObjectToWorld
- CandidateRayWorldToObject
- CommittedRayWorldToObject
- CandidateGetIntersectionTriangleVertexPositions
- CandidateObjectToWorld3x4
- CandidateObjectToWorld4x3
- CandidateWorldToObject3x4
- CandidateWorldToObject4x3
- CandidateInstanceIndex
- CandidateInstanceID
- CandidatePrimitiveIndex
- CandidateGeometryIndex
- CandidateInstanceContributionToHitGroupIndex
- CandidateObjectRayOrigin
- CandidateObjectRayDirection
- CandidateTriangleFrontFace
- CandidateTriangleBarycentrics
- CommittedGetIntersectionTriangleVertexPositions
- CommittedObjectToWorld3x4
- CommittedObjectToWorld4x3
- CommittedWorldToObject3x4
- CommittedWorldToObject4x3
- CommittedInstanceIndex
- CommittedInstanceID
- CommittedPrimitiveIndex
- CommittedGeometryIndex
- CommittedInstanceContributionToHitGroupIndex
- CommittedObjectRayOrigin
- CommittedObjectRayDirection
- CommittedTriangleFrontFace
- CommittedTriangleBarycentrics
- RayFlags
- WorldRayOrigin
- WorldRayDirection
- RayTMin