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.

Structures

ClusteredDecalIterator

#
Used by 1 shader in bevy 0.17.2

An object that allows stepping through all clustered decals that affect a single fragment.

struct ClusteredDecalIterator {
texture_index: i32,
uv: vec2<f32>,
tag: u32,
decal_index_offset: i32,
end_offset: i32,
world_position: vec3<f32>,
}

Functions

clustered_decal_iterator_new

#
Used by 1 shader in bevy 0.17.2
Active when
CLUSTERED_DECALS_ARE_USABLE

let cluster_index = clustered_forward::fragment_cluster_index(frag_coord, view_z, is_orthographic); var clusterable_object_index_ranges = clustered_forward::unpack_clusterable_object_index_ranges(cluster_index);

fn clustered_decal_iterator_new (
world_position: vec3<f32>,
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
) -> ClusteredDecalIterator

clustered_decal_iterator_next

#
Used by 1 shader in bevy 0.17.2
Active when
CLUSTERED_DECALS_ARE_USABLE

Returns true if another decal was found or false if no more decals were found for this position.

fn clustered_decal_iterator_next (
iterator: ptr<function, ClusteredDecalIterator>
) -> bool

get_view_z

#
Used by 1 shader in bevy 0.17.2

Returns the view-space Z coordinate for the given world position.

fn get_view_z (
world_position: vec3<f32>
) -> f32

view_is_orthographic

#
Used by 1 shader in bevy 0.17.2

Returns true if the current view describes an orthographic projection or false otherwise.

fn view_is_orthographic () -> bool

apply_decal_base_color

#

Returns the new base color with decals taken into account. If no decals overlap the current world position, returns the supplied base color unmodified.

fn apply_decal_base_color (
world_position: vec3<f32>,
frag_coord: vec2<f32>,
initial_base_color: vec4<f32>
) -> vec4<f32>
Contents