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<PreviousMeshInput>

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_metadata

#
@group(0)
@binding(7)
var<storage, read_write> indirect_parameters_metadata: array<IndirectParametersMetadata>

mesh_culling_data

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

visibility_ranges

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

depth_pyramid

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

late_preprocess_work_items

#
@group(0)
@binding(12)
var<storage, read_write> late_preprocess_work_items: array<PreprocessWorkItem>

late_preprocess_work_item_indirect_parameters

#
@group(0)
@binding(13)
var<storage, read_write> late_preprocess_work_item_indirect_parameters: array<LatePreprocessWorkItemIndirectParameters>
@if(OCCLUSION_CULLING && 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 {
@if(LATE_PHASE)
dispatch_x: u32 ,
@else()
dispatch_x: atomic<u32> ,
dispatch_y: u32 ,
dispatch_z: u32 ,
@if(LATE_PHASE)
work_item_count: u32 ,
@else()
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

#

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