#define_import_path bevy_pbr::forward_io struct Vertex { @builtin(instance_index) instance_index: u32, #ifdef VERTEX_POSITIONS @location(0) position: vec3, #endif #ifdef VERTEX_NORMALS @location(1) normal: vec3, #endif #ifdef VERTEX_UVS @location(2) uv: vec2, #endif #ifdef VERTEX_UVS_B @location(3) uv_b: vec2, #endif #ifdef VERTEX_TANGENTS @location(4) tangent: vec4, #endif #ifdef VERTEX_COLORS @location(5) color: vec4, #endif #ifdef SKINNED @location(6) joint_indices: vec4, @location(7) joint_weights: vec4, #endif #ifdef MORPH_TARGETS @builtin(vertex_index) index: u32, #endif }; struct VertexOutput { // This is `clip position` when the struct is used as a vertex stage output // and `frag coord` when used as a fragment stage input @builtin(position) position: vec4, @location(0) world_position: vec4, @location(1) world_normal: vec3, #ifdef VERTEX_UVS @location(2) uv: vec2, #endif #ifdef VERTEX_UVS_B @location(3) uv_b: vec2, #endif #ifdef VERTEX_TANGENTS @location(4) world_tangent: vec4, #endif #ifdef VERTEX_COLORS @location(5) color: vec4, #endif #ifdef VERTEX_OUTPUT_INSTANCE_INDEX @location(6) @interpolate(flat) instance_index: u32, #endif } struct FragmentOutput { @location(0) color: vec4, }