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.

mesh_types.wgsl

Import path

Constants

MESH_FLAGS_VISIBILITY_RANGE_INDEX_BITS

#
const MESH_FLAGS_VISIBILITY_RANGE_INDEX_BITS: u32 = (1u << 16u) - 1u

MESH_FLAGS_AABB_BASED_VISIBILITY_RANGE_BIT

#
const MESH_FLAGS_AABB_BASED_VISIBILITY_RANGE_BIT: u32 = 1u << 27u

MESH_FLAGS_NO_FRUSTUM_CULLING_BIT

#
const MESH_FLAGS_NO_FRUSTUM_CULLING_BIT: u32 = 1u << 28u

MESH_FLAGS_SHADOW_RECEIVER_BIT

#
const MESH_FLAGS_SHADOW_RECEIVER_BIT: u32 = 1u << 29u

MESH_FLAGS_TRANSMITTED_SHADOW_RECEIVER_BIT

#
const MESH_FLAGS_TRANSMITTED_SHADOW_RECEIVER_BIT: u32 = 1u << 30u

MESH_FLAGS_SIGN_DETERMINANT_MODEL_3X3_BIT

#
const MESH_FLAGS_SIGN_DETERMINANT_MODEL_3X3_BIT: u32 = 1u << 31u

Structures

Mesh

#
struct Mesh {
world_from_local: mat3x4<f32> ,
previous_world_from_local: mat3x4<f32> ,
local_from_world_transpose_a: mat2x4<f32> ,
local_from_world_transpose_b: f32 ,
flags: u32 ,
lightmap_uv_rect: vec2<u32> ,
first_vertex_index: u32 ,
current_skin_index: u32 ,
material_and_lightmap_bind_group_slot: u32 ,
tag: u32 ,
morph_descriptor_index: u32 ,
}

SkinnedMesh

#
struct SkinnedMesh {
data: array<mat4x4<f32>, 256u> , 🟢 SKINNED
}

MorphWeights

#
struct MorphWeights {
weights: array<vec4<f32>, 64u> , 🟢 MORPH_TARGETS
}

MorphDescriptor

#

Describes a single mesh instance that uses morph targets.

struct MorphDescriptor {
current_weights_offset: u32 , 🟢 MORPH_TARGETS
prev_weights_offset: u32 , 🟢 MORPH_TARGETS
targets_offset: u32 , 🟢 MORPH_TARGETS
vertex_count: u32 , 🟢 MORPH_TARGETS
weight_count: u32 , 🟢 MORPH_TARGETS
}

MorphAttributes

#

Morph displacement for a single vertex.

struct MorphAttributes {
position: vec3<f32> , 🟢 MORPH_TARGETS
pad_a: f32 , 🟢 MORPH_TARGETS
normal: vec3<f32> , 🟢 MORPH_TARGETS
pad_b: f32 , 🟢 MORPH_TARGETS
tangent: vec3<f32> , 🟢 MORPH_TARGETS
pad_c: f32 , 🟢 MORPH_TARGETS
}