내장 값

내장 값

이름 16개

파이프라인이 넘겨주는 @builtin(...) 아이디와 각각이 속한 스테이지입니다.

이름마다 붙은 시그니처와 설명은 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.

@builtin("vertex_index")
The index of the current vertex within its draw call.
@builtin("instance_index")
The index of the current instance within its draw call.
@builtin("position")
The vertex's clip-space position (vertex output) or the fragment's window-space position (fragment input).
@builtin("front_facing")
Whether the current fragment belongs to a front-facing primitive.
@builtin("frag_depth")
Overrides the fragment's depth value.
@builtin("sample_index")
The index of the sample currently being processed, under multisampling.
@builtin("sample_mask")
The set of samples covered by the current fragment invocation.
@builtin("primitive_index")
The index of the primitive the current fragment belongs to.
@builtin("local_invocation_id")
The current invocation's id within its workgroup, as a 3-component vector.
@builtin("local_invocation_index")
The current invocation's flattened index within its workgroup.
@builtin("global_invocation_id")
The current invocation's id across the entire compute dispatch.
@builtin("workgroup_id")
The id of the current invocation's workgroup within the dispatch.
@builtin("num_workgroups")
The number of workgroups dispatched, as given to the dispatch call.
@builtin("subgroup_invocation_id")
The current invocation's index within its subgroup.
@builtin("subgroup_size")
The number of invocations in the current subgroup.
@builtin("clip_distances")
Per-vertex clip distances against the pipeline's enabled user clip planes: a vertex output of array<f32, N> with N from 1 to 8.

이 페이지의 항목은 모두 고정된 커밋의 컴파일러에서 읽어 왔고, 여기서 직접 입력한 것은 없습니다.

이 페이지 편집 문제 보고