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

#

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 ,
uv: vec2<f32> ,
tag: u32 ,
decal_index_offset: i32 ,
end_offset: i32 ,
world_position: vec3<f32> ,
}

Functions

clustered_decal_iterator_new

#

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

#

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

#

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

apply_decals

#
fn apply_decals (
pbr_input: ptr<function, PbrInput>
)
Contents