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.

Constants

CENTIMETERS_PER_METER

#
const CENTIMETERS_PER_METER: AbstractFloat = 100.0

Bindings

depth_pyramid

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(0)
var depth_pyramid: texture_2d<f32>
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(0)
var depth_pyramid: texture_2d<f32>
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(0)
var depth_pyramid: texture_2d<f32>

view

#
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(1)
var<uniform> view: View
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(1)
var<uniform> view: View
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(1)
var<uniform> view: View
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(8)
var<uniform> view: View

previous_view

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(2)
var<uniform> previous_view: PreviousViewUniforms
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(2)
var<uniform> previous_view: PreviousViewUniforms
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(2)
var<uniform> previous_view: PreviousViewUniforms

meshlet_instance_uniforms

#
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(3)
var<storage, read> meshlet_instance_uniforms: array<Mesh>
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(4)
var<storage, read> meshlet_instance_uniforms: array<Mesh>
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(4)
var<storage, read> meshlet_instance_uniforms: array<Mesh>
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(4)
var<storage, read> meshlet_instance_uniforms: array<Mesh>
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(7)
var<storage, read> meshlet_instance_uniforms: array<Mesh>

meshlet_view_instance_visibility

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(4)
var<storage, read> meshlet_view_instance_visibility: array<u32>

meshlet_instance_aabbs

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(5)
var<storage, read> meshlet_instance_aabbs: array<MeshletAabb>

meshlet_instance_bvh_root_nodes

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(6)
var<storage, read> meshlet_instance_bvh_root_nodes: array<u32>

meshlet_bvh_cull_count_write

#
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(7)
var<storage, read_write> meshlet_bvh_cull_count_write: atomic<u32>
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(6)
var<storage, read_write> meshlet_bvh_cull_count_write: atomic<u32>

meshlet_bvh_cull_dispatch

#
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(8)
var<storage, read_write> meshlet_bvh_cull_dispatch: DispatchIndirectArgs
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(7)
var<storage, read_write> meshlet_bvh_cull_dispatch: DispatchIndirectArgs

meshlet_bvh_cull_queue

#
Active when
MESHLET_INSTANCE_CULLING_PASS
@group(0)
@binding(9)
var<storage, read_write> meshlet_bvh_cull_queue: array<InstancedOffset>
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(8)
var<storage, read_write> meshlet_bvh_cull_queue: array<InstancedOffset>

meshlet_second_pass_instance_count

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(10)
var<storage, read_write> meshlet_second_pass_instance_count: atomic<u32>
Active when
MESHLET_INSTANCE_CULLING_PASS AND !MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(10)
var<storage, read> meshlet_second_pass_instance_count: u32

meshlet_second_pass_instance_dispatch

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(11)
var<storage, read_write> meshlet_second_pass_instance_dispatch: DispatchIndirectArgs

meshlet_second_pass_instance_candidates

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_INSTANCE_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(12)
var<storage, read_write> meshlet_second_pass_instance_candidates: array<u32>
Active when
MESHLET_INSTANCE_CULLING_PASS AND !MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(11)
var<storage, read> meshlet_second_pass_instance_candidates: array<u32>

meshlet_bvh_nodes

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(3)
var<storage, read> meshlet_bvh_nodes: array<BvhNode>

meshlet_bvh_cull_count_read

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(5)
var<storage, read> meshlet_bvh_cull_count_read: u32

meshlet_meshlet_cull_count_early

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(9)
var<storage, read_write> meshlet_meshlet_cull_count_early: atomic<u32>

meshlet_meshlet_cull_count_late

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(10)
var<storage, read_write> meshlet_meshlet_cull_count_late: atomic<u32>

meshlet_meshlet_cull_dispatch_early

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(11)
var<storage, read_write> meshlet_meshlet_cull_dispatch_early: DispatchIndirectArgs

meshlet_meshlet_cull_dispatch_late

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(12)
var<storage, read_write> meshlet_meshlet_cull_dispatch_late: DispatchIndirectArgs

meshlet_meshlet_cull_queue

#
Active when
MESHLET_BVH_CULLING_PASS
@group(0)
@binding(13)
var<storage, read_write> meshlet_meshlet_cull_queue: array<InstancedOffset>
Active when
MESHLET_CLUSTER_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(12)
var<storage, read_write> meshlet_meshlet_cull_queue: array<InstancedOffset>
Active when
MESHLET_CLUSTER_CULLING_PASS AND !MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(10)
var<storage, read> meshlet_meshlet_cull_queue: array<InstancedOffset>

meshlet_second_pass_bvh_count

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(14)
var<storage, read_write> meshlet_second_pass_bvh_count: atomic<u32>

meshlet_second_pass_bvh_dispatch

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(15)
var<storage, read_write> meshlet_second_pass_bvh_dispatch: DispatchIndirectArgs

meshlet_second_pass_bvh_queue

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_BVH_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(16)
var<storage, read_write> meshlet_second_pass_bvh_queue: array<InstancedOffset>

meshlet_cull_data

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(3)
var<storage, read> meshlet_cull_data: array<MeshletCullData>

meshlet_software_raster_indirect_args

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(5)
var<storage, read_write> meshlet_software_raster_indirect_args: DispatchIndirectArgs

meshlet_hardware_raster_indirect_args

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(6)
var<storage, read_write> meshlet_hardware_raster_indirect_args: DrawIndirectArgs

meshlet_previous_raster_counts

#
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(7)
var<storage, read> meshlet_previous_raster_counts: array<u32>
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(5)
var<storage, read> meshlet_previous_raster_counts: array<u32>

meshlet_raster_clusters

#
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(8)
var<storage, read_write> meshlet_raster_clusters: array<InstancedOffset>
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(0)
var<storage, read> meshlet_raster_clusters: array<InstancedOffset>
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(1)
var<storage, read> meshlet_raster_clusters: array<InstancedOffset>

meshlet_meshlet_cull_count_read

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_CLUSTER_CULLING_PASS
@group(0)
@binding(9)
var<storage, read> meshlet_meshlet_cull_count_read: u32

meshlet_meshlet_cull_count_write

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_CLUSTER_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(10)
var<storage, read_write> meshlet_meshlet_cull_count_write: atomic<u32>

meshlet_meshlet_cull_dispatch

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_CLUSTER_CULLING_PASS AND MESHLET_FIRST_CULLING_PASS
@group(0)
@binding(11)
var<storage, read_write> meshlet_meshlet_cull_dispatch: DispatchIndirectArgs

meshlets

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(1)
var<storage, read> meshlets: array<Meshlet>
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(2)
var<storage, read> meshlets: array<Meshlet>

meshlet_indices

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(2)
var<storage, read> meshlet_indices: array<u32>
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(3)
var<storage, read> meshlet_indices: array<u32>

meshlet_vertex_positions

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(3)
var<storage, read> meshlet_vertex_positions: array<u32>
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(4)
var<storage, read> meshlet_vertex_positions: array<u32>

meshlet_software_raster_cluster_count

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
@group(0)
@binding(6)
var<storage, read> meshlet_software_raster_cluster_count: u32

meshlet_visibility_buffer

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS AND MESHLET_VISIBILITY_BUFFER_RASTER_PASS_OUTPUT
@group(0)
@binding(7)
var meshlet_visibility_buffer: texture_storage_2d<r64uint, atomic>
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS AND !MESHLET_VISIBILITY_BUFFER_RASTER_PASS_OUTPUT
@group(0)
@binding(7)
var meshlet_visibility_buffer: texture_storage_2d<r32uint, atomic>
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(0)
var meshlet_visibility_buffer: texture_storage_2d<r64uint, read>

meshlet_vertex_normals

#
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(5)
var<storage, read> meshlet_vertex_normals: array<u32>

meshlet_vertex_uvs

#
Active when
MESHLET_MESH_MATERIAL_PASS
@group(2)
@binding(6)
var<storage, read> meshlet_vertex_uvs: array<vec2<f32>>

Structures

BvhNode

#
struct BvhNode {
lod_bounds: array<vec4<f32>, 8>,
child_counts: array<u32, 2>,
_padding: vec2<u32>,
}

Meshlet

#
Used by 1 shader in bevy_pbr 0.17.2
struct Meshlet {
start_vertex_position_bit: u32,
start_vertex_attribute_id: u32,
start_index_id: u32,
packed_a: u32,
packed_b: u32,
min_vertex_position_channel_x: f32,
min_vertex_position_channel_y: f32,
min_vertex_position_channel_z: f32,
}

MeshletCullData

#
struct MeshletCullData {
lod_group_sphere: vec4<f32>,
}

MeshletAabb

#
Used by 1 shader in bevy_pbr 0.17.2
struct MeshletAabb {
center: vec3<f32>,
half_extent: vec3<f32>,
}

MeshletAabbErrorOffset

#
struct MeshletAabbErrorOffset {
center_and_error: vec4<f32>,
half_extent_and_child_offset: vec4<f32>,
}

DispatchIndirectArgs

#
Used by 1 shader in bevy_pbr 0.17.2
struct DispatchIndirectArgs {
x: atomic<u32>,
y: u32,
z: u32,
}

DrawIndirectArgs

#
struct DrawIndirectArgs {
vertex_count: u32,
instance_count: atomic<u32>,
first_vertex: u32,
first_instance: u32,
}

InstancedOffset

#

Either a BVH node or a meshlet, along with the instance it is associated with. Refers to BVH nodes in meshlet_bvh_cull_queue and meshlet_second_pass_bvh_queue, where offset is the index into meshlet_bvh_nodes. Refers to meshlets in meshlet_meshlet_cull_queue and meshlet_raster_clusters. In meshlet_meshlet_cull_queue, offset is the index into meshlet_cull_data. In meshlet_raster_clusters, offset is the index into meshlets.

struct InstancedOffset {
instance_id: u32,
offset: u32,
}

Constants

#
struct Constants {
scene_instance_count: u32, MESHLET_INSTANCE_CULLING_PASS
}
struct Constants {
read_from_front: u32, MESHLET_BVH_CULLING_PASS
rightmost_slot: u32, MESHLET_BVH_CULLING_PASS
}
struct Constants {
rightmost_slot: u32, MESHLET_CLUSTER_CULLING_PASS
}

Functions

get_meshlet_vertex_count

#
fn get_meshlet_vertex_count (
meshlet: ptr<function, Meshlet>
) -> u32

get_meshlet_triangle_count

#
fn get_meshlet_triangle_count (
meshlet: ptr<function, Meshlet>
) -> u32

get_aabb

#
fn get_aabb (
aabb: ptr<function, MeshletAabbErrorOffset>
) -> MeshletAabb

get_aabb_error

#
fn get_aabb_error (
aabb: ptr<function, MeshletAabbErrorOffset>
) -> f32

get_aabb_child_offset

#
Used by 1 shader in bevy_pbr 0.17.2
fn get_aabb_child_offset (
aabb: ptr<function, MeshletAabbErrorOffset>
) -> u32

get_meshlet_vertex_id

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
fn get_meshlet_vertex_id (
index_id: u32
) -> u32
Active when
MESHLET_MESH_MATERIAL_PASS
fn get_meshlet_vertex_id (
index_id: u32
) -> u32

get_meshlet_vertex_position

#
Active when
MESHLET_VISIBILITY_BUFFER_RASTER_PASS
fn get_meshlet_vertex_position (
meshlet: ptr<function, Meshlet>,
vertex_id: u32
) -> vec3<f32>
Active when
MESHLET_MESH_MATERIAL_PASS
fn get_meshlet_vertex_position (
meshlet: ptr<function, Meshlet>,
vertex_id: u32
) -> vec3<f32>

get_meshlet_vertex_normal

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_MESH_MATERIAL_PASS
fn get_meshlet_vertex_normal (
meshlet: ptr<function, Meshlet>,
vertex_id: u32
) -> vec3<f32>

get_meshlet_vertex_uv

#
Used by 1 shader in bevy_pbr 0.17.2
Active when
MESHLET_MESH_MATERIAL_PASS
fn get_meshlet_vertex_uv (
meshlet: ptr<function, Meshlet>,
vertex_id: u32
) -> vec2<f32>
Contents