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.
Star

Structures

UncompressedVertex

#
struct UncompressedVertex {
@builtin(instance_index)
instance_index: u32,
@location(0)
position: vec3<f32>, VERTEX_POSITIONS
@location(1)
normal: vec3<f32>, VERTEX_NORMALS
@location(2)
uv: vec2<f32>, VERTEX_UVS_A
@location(3)
uv_b: vec2<f32>, VERTEX_UVS_B
@location(4)
tangent: vec4<f32>, VERTEX_TANGENTS
@location(5)
color: vec4<f32>, VERTEX_COLORS
@location(6)
joint_indices: vec4<u32>, SKINNED
@location(7)
joint_weights: vec4<f32>, SKINNED
@builtin(vertex_index)
index: u32, MORPH_TARGETS
}

Vertex

#
struct Vertex {
@builtin(instance_index)
instance_index: u32,
@location(0)
compressed_position: vec4<f32>, VERTEX_POSITIONS AND VERTEX_POSITIONS_COMPRESSED
@location(0)
position: vec3<f32>, VERTEX_POSITIONS AND !VERTEX_POSITIONS_COMPRESSED
@location(1)
compressed_normal: vec2<f32>, VERTEX_NORMALS AND VERTEX_NORMALS_COMPRESSED
@location(1)
normal: vec3<f32>, VERTEX_NORMALS AND !VERTEX_NORMALS_COMPRESSED
@location(2)
compressed_uv: vec2<f32>, VERTEX_UVS_A AND VERTEX_UVS_A_COMPRESSED
@location(2)
uv: vec2<f32>, VERTEX_UVS_A AND !VERTEX_UVS_A_COMPRESSED
@location(3)
compressed_uv_b: vec2<f32>, VERTEX_UVS_B AND VERTEX_UVS_B_COMPRESSED
@location(3)
uv_b: vec2<f32>, VERTEX_UVS_B AND !VERTEX_UVS_B_COMPRESSED
@location(4)
compressed_tangent: vec2<f32>, VERTEX_TANGENTS AND VERTEX_TANGENTS_COMPRESSED
@location(4)
tangent: vec4<f32>, VERTEX_TANGENTS AND !VERTEX_TANGENTS_COMPRESSED
@location(5)
color: vec4<f32>, VERTEX_COLORS
@location(6)
joint_indices: vec4<u32>, SKINNED
@location(7)
joint_weights: vec4<f32>, SKINNED
@builtin(vertex_index)
index: u32, MORPH_TARGETS
}

VertexOutput

#
struct VertexOutput {
@builtin(position)
position: vec4<f32>,
@location(0)
world_position: vec4<f32>,
@location(1)
world_normal: vec3<f32>,
@location(2)
uv: vec2<f32>, VERTEX_UVS_A
@location(3)
uv_b: vec2<f32>, VERTEX_UVS_B
@location(4)
world_tangent: vec4<f32>, VERTEX_TANGENTS
@location(5)
color: vec4<f32>, VERTEX_COLORS
@location(6)
@interpolate(flat)
instance_index: u32, VERTEX_OUTPUT_INSTANCE_INDEX
@location(7)
@interpolate(flat)
visibility_range_dither: i32, VISIBILITY_RANGE_DITHER
}

FragmentOutput

#
struct FragmentOutput {
@location(0)
color: vec4<f32>,
}

Functions

decompress_vertex

#
Active when
!MESHLET_MESH_MATERIAL_PASS

The instance_index parameter must match vertex_in.instance_index. This is a work around for a wgpu dx12 bug. See https://github.com/gfx-rs/naga/issues/2416

fn decompress_vertex (
vertex_in: Vertex,
instance_index: u32
) -> UncompressedVertex
Contents