Back home 🏡 WGSL Spec Bevy WGSL Functions

morph.wgsl

Import path

Constants

Name Type Value Shader Def
position_offset # u32 0u 🟢 MORPH_TARGETS
normal_offset # u32 3u 🟢 MORPH_TARGETS
tangent_offset # u32 6u 🟢 MORPH_TARGETS
total_component_count # u32 9u 🟢 MORPH_TARGETS

Bindings

Name Group Binding index Binding type Type Shader Def
morph_weights # 1 2 <uniform> MorphWeights 🟢 MORPH_TARGETS
morph_targets # 1 3 texture_3d<f32> 🟢 MORPH_TARGETS
prev_morph_weights # 1 7 <uniform> MorphWeights 🟢 MORPH_TARGETS

Functions

layer_count

#

Shader defs:

🟢 MORPH_TARGETS

fn layer_count() -> u32
Returns: u32

component_texture_coord

#

Shader defs:

🟢 MORPH_TARGETS

fn component_texture_coord(vertex_index: u32, component_offset: u32) -> vec2<u32>
Parameter Type
vertex_index u32
component_offset u32
Returns: vec2<u32>

weight_at

#

Shader defs:

🟢 MORPH_TARGETS

fn weight_at(weight_index: u32) -> f32
Parameter Type
weight_index u32
Returns: f32

prev_weight_at

#

Shader defs:

🟢 MORPH_TARGETS

fn prev_weight_at(weight_index: u32) -> f32
Parameter Type
weight_index u32
Returns: f32

morph_pixel

#

Shader defs:

🟢 MORPH_TARGETS

fn morph_pixel(vertex: u32, component: u32, weight: u32) -> f32
Parameter Type
vertex u32
component u32
weight u32
Returns: f32

morph

#

Shader defs:

🟢 MORPH_TARGETS

fn morph(vertex_index: u32, component_offset: u32, weight_index: u32) -> vec3<f32>
Parameter Type
vertex_index u32
component_offset u32
weight_index u32
Returns: vec3<f32>