Bevy Shader Explorer
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.
☾
Packages
›
bevy_pbr
0.15.3
0.15.0
0.15.1
0.15.2
0.19.1
›
clustered_forward.wgsl
Copy import path
Save
Constants
CLUSTER_COUNT_SIZE
#
Copy import statement
Used by 3 shaders
bevy_pbr 0.15.3 — pbr_functions.wgsl
bevy_pbr 0.15.3 — volumetric_fog.wgsl
naga_oil 0.16.0 — pbr_functions.wgsl
const
CLUSTER_COUNT_SIZE:
u32
=
9u
Functions
view_z_to_z_slice
#
Copy import statement
Used by 3 shaders
bevy_pbr 0.15.3 — pbr_functions.wgsl
bevy_pbr 0.15.3 — volumetric_fog.wgsl
naga_oil 0.16.0 — pbr_functions.wgsl
NOTE: Keep in sync with bevy_pbr/src/light.rs
fn
view_z_to_z_slice
(
view_z:
f32
,
is_orthographic:
bool
)
->
u32
fragment_cluster_index
#
Copy import statement
Used by 3 shaders
bevy_pbr 0.15.3 — pbr_functions.wgsl
bevy_pbr 0.15.3 — volumetric_fog.wgsl
naga_oil 0.16.0 — pbr_functions.wgsl
fn
fragment_cluster_index
(
frag_coord:
vec2
<
f32
>,
view_z:
f32
,
is_orthographic:
bool
)
->
u32
unpack_offset_and_counts
#
Copy import statement
Used by 3 shaders
bevy_pbr 0.15.3 — pbr_functions.wgsl
bevy_pbr 0.15.3 — volumetric_fog.wgsl
naga_oil 0.16.0 — pbr_functions.wgsl
fn
unpack_offset_and_counts
(
cluster_index:
u32
)
->
vec3
<
u32
>
get_clusterable_object_id
#
Copy import statement
Used by 3 shaders
bevy_pbr 0.15.3 — pbr_functions.wgsl
bevy_pbr 0.15.3 — volumetric_fog.wgsl
naga_oil 0.16.0 — pbr_functions.wgsl
fn
get_clusterable_object_id
(
index:
u32
)
->
u32
cluster_debug_visualization
#
Copy import statement
Used by 3 shaders
bevy_pbr 0.15.3 — pbr_functions.wgsl
bevy_pbr 0.15.3 — volumetric_fog.wgsl
naga_oil 0.16.0 — pbr_functions.wgsl
fn
cluster_debug_visualization
(
input_color:
vec4
<
f32
>,
view_z:
f32
,
is_orthographic:
bool
,
offset_and_counts:
vec3
<
u32
>,
cluster_index:
u32
)
->
vec4
<
f32
>
Contents
Constants
CLUSTER_COUNT_SIZE
Functions
view_z_to_z_slice
fragment_cluster_index
unpack_offset_and_counts
get_clusterable_object_id
cluster_debug_visualization
NOTE: Keep in sync with bevy_pbr/src/light.rs