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.

Bindings

current_input

#
@group(0)
@binding(3)
var<storage> current_input: array<MeshInput>

previous_input

#
@group(0)
@binding(4)
var<storage> previous_input: array<MeshInput>

work_items

#
@group(0)
@binding(5)
var<storage> work_items: array<PreprocessWorkItem>

output

#
@group(0)
@binding(6)
var<storage, read_write> output: array<Mesh>

indirect_parameters_cpu_metadata

#
Active when
INDIRECT
@group(0)
@binding(7)
var<storage> indirect_parameters_cpu_metadata: array<IndirectParametersCpuMetadata>

indirect_parameters_gpu_metadata

#
Active when
INDIRECT
@group(0)
@binding(8)
var<storage, read_write> indirect_parameters_gpu_metadata: array<IndirectParametersGpuMetadata>

mesh_culling_data

#
Active when
FRUSTUM_CULLING
@group(0)
@binding(9)
var<storage> mesh_culling_data: array<MeshCullingData>

visibility_ranges

#
Active when
FRUSTUM_CULLING
@group(0)
@binding(10)
var<storage> visibility_ranges: array<vec4<f32>>

depth_pyramid

#
Active when
OCCLUSION_CULLING
@group(0)
@binding(11)
var depth_pyramid: texture_2d<f32>

late_preprocess_work_items

#
Active when
OCCLUSION_CULLING AND EARLY_PHASE
@group(0)
@binding(12)
var<storage, read_write> late_preprocess_work_items: array<PreprocessWorkItem>

late_preprocess_work_item_indirect_parameters

#
Active when
OCCLUSION_CULLING AND EARLY_PHASE
@group(0)
@binding(13)
var<storage, read_write> late_preprocess_work_item_indirect_parameters: array<LatePreprocessWorkItemIndirectParameters>
Active when
OCCLUSION_CULLING AND LATE_PHASE
@group(0)
@binding(13)
var<storage, read> late_preprocess_work_item_indirect_parameters: array<LatePreprocessWorkItemIndirectParameters>

Structures

MeshCullingData

#

At the moment, this just consists of its axis-aligned bounding box (AABB).

struct MeshCullingData {
aabb_center: vec4<f32>,
aabb_half_extents: vec4<f32>,
}

LatePreprocessWorkItemIndirectParameters

#

The parameters for the indirect compute dispatch for the late mesh preprocessing phase.

struct LatePreprocessWorkItemIndirectParameters {
dispatch_x: atomic<u32>,
dispatch_y: u32,
dispatch_z: u32,
work_item_count: atomic<u32>,
pad: vec4<u32>,
}

Immediates

#

These have to be in a structure because of Naga limitations on DX12.

struct Immediates {
late_preprocess_work_item_indirect_offset: u32,
}

Functions

view_frustum_intersects_obb

#
Active when
FRUSTUM_CULLING

aabb_center.w should be 1.0.

fn view_frustum_intersects_obb (
world_from_local: mat4x4<f32>,
aabb_center: vec4<f32>,
aabb_half_extents: vec3<f32>
) -> bool

main

#
@compute
Runs custom parallel code on the GPU, not limited to graphics
@workgroup_size(64)
Defines the size of a thread group. One to three numbers: width (x), height (y), and depth (z). Missing values default to 1
fn main (
@builtin(global_invocation_id)
global_invocation_id: vec3<u32>
)
Contents