pub enum SystemValue {
Show 38 variants
ClipPosition,
FragCoord,
FrontFacing,
VertexIndex,
InstanceIndex,
PrimitiveIndex,
SampleIndex,
RenderTargetArrayIndex,
ViewportArrayIndex,
ClipDistance,
CullDistance,
Target(u32),
Depth,
DepthGreaterEqual,
DepthLessEqual,
StencilRef,
Coverage,
InnerCoverage,
GroupId,
GroupThreadId,
DispatchThreadId,
GroupIndex,
LaneIndex,
LaneCount,
DispatchRaysIndex,
DispatchRaysDimensions,
WorldRayOrigin,
WorldRayDirection,
ObjectRayOrigin,
ObjectRayDirection,
RayTMin,
RayTCurrent,
RayFlags,
InstanceId,
GeometryIndex,
HitKind,
ObjectToWorld,
WorldToObject,
}Expand description
The system values, one vocabulary for every API: what the pipeline itself supplies to or takes from a stage.
Variants§
ClipPosition
A vertex stage’s clip-space position output.
FragCoord
A pixel stage’s window-space position input (x, y, depth, 1/w).
FrontFacing
A pixel stage’s input: whether the primitive is front facing.
VertexIndex
A vertex stage’s input: the index of the vertex being processed.
InstanceIndex
A vertex stage’s instance number; in a ray tracing hit program, the instance’s index in the acceleration structure.
PrimitiveIndex
A pixel stage’s primitive number; in a ray tracing hit program, the hit primitive’s index in its geometry.
SampleIndex
A pixel stage’s input: the index of the sample being shaded when it runs per sample.
RenderTargetArrayIndex
The index of the render target array slice a primitive goes to (a geometry or mesh output, a pixel input).
ViewportArrayIndex
The index of the viewport a primitive is drawn in (a geometry or mesh output, a pixel input).
ClipDistance
Clip distances; the label’s index says which array element.
CullDistance
Cull distances; the label’s index says which array element.
Target(u32)
Colour output n.
Depth
A pixel stage’s depth output, written freely.
DepthGreaterEqual
Depth output the program promises is not less than the rasterized depth.
DepthLessEqual
Depth output the program promises is not greater than the rasterized depth.
StencilRef
A pixel stage’s stencil reference output.
Coverage
Coverage mask, as an input or an output.
InnerCoverage
Coverage of the pixel by the primitive alone (conservative rasterization).
GroupId
A compute stage’s thread group (workgroup) number, three components.
GroupThreadId
A compute invocation’s position inside its thread group, three components.
DispatchThreadId
A compute invocation’s position in the whole dispatch (group number times the group size plus its position in the group), three components.
GroupIndex
A compute invocation’s index in its thread group, row-major over the group’s three axes.
LaneIndex
The invocation’s lane in its wave (subgroup).
LaneCount
How many lanes the wave (subgroup) has.
DispatchRaysIndex
A ray tracing program’s position in the dispatch, three components.
DispatchRaysDimensions
The size of the dispatch a ray tracing program runs in, three components.
WorldRayOrigin
The traced ray’s origin and direction in world space, three components each.
WorldRayDirection
The ray’s direction in world space.
ObjectRayOrigin
The same in the space of the instance the ray hit (an intersection, any-hit or closest-hit program).
ObjectRayDirection
The ray’s direction in the instance’s space.
RayTMin
The ray’s start and the distance of the closest accepted hit so far (or the candidate being tested, in an any-hit program), along the ray.
RayTCurrent
The distance along the ray of the closest accepted hit so far, or of the candidate being tested in an any-hit program.
RayFlags
The traced ray’s flags.
InstanceId
The hit instance’s own identifier (the 24 bits the acceleration structure was built with).
GeometryIndex
The geometry’s index within the hit instance’s bottom-level acceleration structure.
HitKind
What the intersection program reported the hit as (ReportHit’s kind).
ObjectToWorld
The hit instance’s 3 by 4 transform to world space and back. One varying for each row used, the label’s index naming the row, its four lanes the row’s four columns.
WorldToObject
The inverse of SystemValue::ObjectToWorld, in the same row layout.
Trait Implementations§
Source§impl Clone for SystemValue
impl Clone for SystemValue
Source§fn clone(&self) -> SystemValue
fn clone(&self) -> SystemValue
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more