Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

clustered.wgsl

Import path

Structures

ClusteredDecalIterator

#

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

struct ClusteredDecalIterator {
base_color_texture_index: i32 ,
normal_map_texture_index: i32 ,
metallic_roughness_texture_index: i32 ,
emissive_texture_index: i32 ,
tag: u32 ,
decal_index_offset: i32 ,
end_offset: i32 ,
world_position: vec3<f32> ,
}

Functions

clustered_decal_iterator_new

#

Shader defs requirments:

🟢 CLUSTERED_DECALS_ARE_USABLE

let cluster_index = clustered_forward::view_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

#

Shader defs requirments:

🟢 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 ( ) -> bool

get_view_z

#

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

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

view_is_orthographic

#

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

fn view_is_orthographic ()

apply_decals

#
fn apply_decals ( )