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

cluster_metadata

#
@group(0)
@binding(0)
var<storage, read_write> cluster_metadata: ClusterMetadata

z_slices

#
@group(0)
@binding(1)
var<storage, read_write> z_slices: array<ClusterableObjectZSlice>

clustered_lights

#
@group(0)
@binding(2)
var<storage> clustered_lights: ClusteredLights

light_probes

#
@group(0)
@binding(3)
var<uniform> light_probes: LightProbes

clustered_decals

#
@group(0)
@binding(4)
var<storage> clustered_decals: ClusteredDecals

lights

#
@group(0)
@binding(5)
var<uniform> lights: Lights

view

#
@group(0)
@binding(6)
var<uniform> view: View

Functions

z_slice_main

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

try_write_z_slice

#

This silently fails if the list is too small, but it still updates the instance count, which the CPU reads back. So, if the list is too small, the CPU will end up being notified and can resize the buffer.

fn try_write_z_slice (
object_index: u32
, 
object_type: u32
, 
z_slice: u32
)

accumulate_farthest_z_value

#

Records the farthest Z value for clusterable objects in this workgroup for the CPU to read back.

fn accumulate_farthest_z_value (
local_id: u32
, 
position: vec3<f32>
, 
radius: f32
, 
view_from_world_scale: vec3<f32>
, 
is_orthographic: bool
)

f32_bits_to_sortable_u32

#

The CPU decodes with sortable_u32_to_f32_bits in gpu.rs.

fn f32_bits_to_sortable_u32 (
bits: u32
) -> u32
Contents