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.
Star

Constants

morph_position_offset

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
const morph_position_offset: u32 = 0u

morph_total_component_count

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
const morph_total_component_count: u32 = 9u

Bindings

view_uniform

#
@group(0)
@binding(0)
var<uniform> view_uniform: OutlineViewUniform

mesh

#
Active when
INSTANCE_BATCH_SIZE
@group(1)
@binding(0)
var<uniform> mesh: array<Instance, #{INSTANCE_BATCH_SIZE}u>
Active when
!INSTANCE_BATCH_SIZE
@group(1)
@binding(0)
var<storage> mesh: array<Instance>

morph_weights

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
@group(2)
@binding(2)
var<uniform> morph_weights: MorphWeights
Active when
MORPH_TARGETS AND !SKINS_USE_UNIFORM_BUFFERS
@group(2)
@binding(2)
var<storage> morph_weights: array<f32>

morph_targets

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
@group(2)
@binding(3)
var morph_targets: texture_3d<f32>
Active when
MORPH_TARGETS AND !SKINS_USE_UNIFORM_BUFFERS
@group(2)
@binding(3)
var<storage> morph_targets: array<MorphAttributes>

morph_descriptors

#
Active when
MORPH_TARGETS AND !SKINS_USE_UNIFORM_BUFFERS
@group(2)
@binding(8)
var<storage> morph_descriptors: array<MorphDescriptor>

Structures

Instance

#
struct Instance {
world_from_local: mat3x4<f32>,
world_plane_origin: vec3<f32>,
world_plane_offset: vec3<f32>,
volume_colour: vec4<f32>,
volume_offset: f32,
stencil_offset: f32,
alpha_mask_threshold: f32,
first_vertex_index: u32,
current_skin_index: u32,
current_morph_index: u32,
}

Vertex

#
struct Vertex {
@location(0)
position: vec3<f32>,
@builtin(instance_index)
instance_index: u32,
@location(1)
outline_normal: vec3<f32>, !VERTEX_OFFSET_ZERO
@location(2)
uv: vec2<f32>, ALPHA_MASK_TEXTURE
@location(5)
joint_indices: vec4<u32>, SKINNED
@location(6)
joint_weights: vec4<f32>, SKINNED
@builtin(vertex_index)
index: u32, MORPH_TARGETS
}

Functions

morph_layer_count

#
Active when
MORPH_TARGETS
fn morph_layer_count (
descriptor_index: u32
) -> u32

morph_weight_at

#
Active when
MORPH_TARGETS
fn morph_weight_at (
weight_index: u32,
descriptor_index: u32
) -> f32

morph_component_texture_coord

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
fn morph_component_texture_coord (
vertex_index: u32,
component_offset: u32
) -> vec2<u32>

morph_pixel

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
fn morph_pixel (
vertex: u32,
component: u32,
weight: u32
) -> f32

morph

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
fn morph (
vertex_index: u32,
component_offset: u32,
weight_index: u32
) -> vec3<f32>

morph_position

#
Active when
MORPH_TARGETS AND SKINS_USE_UNIFORM_BUFFERS
fn morph_position (
vertex_index: u32,
weight_index: u32,
instance_index: u32
) -> vec3<f32>
Active when
MORPH_TARGETS AND !SKINS_USE_UNIFORM_BUFFERS
fn morph_position (
vertex_index: u32,
weight_index: u32,
descriptor_index: u32
) -> vec3<f32>

get_morph_target

#
Active when
MORPH_TARGETS AND !SKINS_USE_UNIFORM_BUFFERS
fn get_morph_target (
vertex_index: u32,
weight_index: u32,
descriptor_index: u32
) -> MorphAttributes

morph_vertex

#
Active when
MORPH_TARGETS
fn morph_vertex (
vertex_in: Vertex,
instance_index: u32
) -> Vertex

skin_model

#
Active when
SKINNED
fn skin_model (
indexes: vec4<u32>,
weights: vec4<f32>,
instance_index: u32
) -> mat4x4<f32>

mat4to3

#
fn mat4to3 ( ) -> mat3x3<f32>

model_origin_z

#
fn model_origin_z (
plane: vec3<f32>,
view_proj: mat4x4<f32>
) -> f32

vertex

#
@vertex
Processes each 3D point in a model before it's drawn
fn vertex (
vertex_no_morph: Vertex
) -> VertexOutput
Contents