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.

outline.wgsl

Bindings

view_uniform

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

mesh

#

Shader defs requirments:

🟢 INSTANCE_BATCH_SIZE

@group(2)
@binding(0)
var<uniform> mesh: Instance

mesh

#

Shader defs requirments:

šŸ”“ 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> ,
@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

#

Shader defs requirments:

🟢 MORPH_TARGETS

fn morph_vertex (
vertex_in: Vertex
) -> Vertex

mat4to3

#
fn mat4to3 ( ) -> mat3x3<f32>

model_origin_z

#
fn model_origin_z (
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