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.

Bindings

view_uniform

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

mesh

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

Structures

Instance

#
struct Instance {
world_from_local: mat3x4<f32>,
world_plane_origin: vec3<f32>,
world_plane_offset: vec3<f32>,
volume_offset: f32,
volume_colour: vec4<f32>,
stencil_offset: f32,
alpha_mask_threshold: f32,
first_vertex_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
}

OutlineViewUniform

#
struct OutlineViewUniform {
@align(16)
clip_from_world: mat4x4<f32>,
world_from_view_a: mat2x4<f32>,
world_from_view_b: f32,
aspect: f32,
scale: vec2<f32>,
}

Functions

morph_vertex

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

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