Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.
1#define_import_path bevy_pbr::forward_io
3struct Vertex {
4 @builtin(instance_index) instance_index: u32,
5#ifdef VERTEX_POSITIONS
6 @location(0) position: vec3<f32>,
7#endif
8#ifdef VERTEX_NORMALS
9 @location(1) normal: vec3<f32>,
10#endif
11#ifdef VERTEX_UVS_A
12 @location(2) uv: vec2<f32>,
13#endif
14#ifdef VERTEX_UVS_B
15 @location(3) uv_b: vec2<f32>,
16#endif
17#ifdef VERTEX_TANGENTS
18 @location(4) tangent: vec4<f32>,
19#endif
20#ifdef VERTEX_COLORS
21 @location(5) color: vec4<f32>,
22#endif
23#ifdef SKINNED
24 @location(6) joint_indices: vec4<u32>,
25 @location(7) joint_weights: vec4<f32>,
26#endif
27#ifdef MORPH_TARGETS
28 @builtin(vertex_index) index: u32,
29#endif
30};
32struct VertexOutput {
33 // This is `clip position` when the struct is used as a vertex stage output
34 // and `frag coord` when used as a fragment stage input
35 @builtin(position) position: vec4<f32>,
36 @location(0) world_position: vec4<f32>,
37 @location(1) world_normal: vec3<f32>,
38#ifdef VERTEX_UVS_A
39 @location(2) uv: vec2<f32>,
40#endif
41#ifdef VERTEX_UVS_B
42 @location(3) uv_b: vec2<f32>,
43#endif
44#ifdef VERTEX_TANGENTS
45 @location(4) world_tangent: vec4<f32>,
46#endif
47#ifdef VERTEX_COLORS
48 @location(5) color: vec4<f32>,
49#endif
50#ifdef VERTEX_OUTPUT_INSTANCE_INDEX
51 @location(6) @interpolate(flat) instance_index: u32,
52#endif
53#ifdef VISIBILITY_RANGE_DITHER
54 @location(7) @interpolate(flat) visibility_range_dither: i32,
55#endif
58struct FragmentOutput {
59 @location(0) color: vec4<f32>,
Contents