Shader Explorer
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

Constants

morph_position_offset

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

const morph_position_offset: u32 = 0u

morph_total_component_count

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

const morph_total_component_count: u32 = 9u

Bindings

view_uniform

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

mesh

#

Shader defs requirments:

🟢 INSTANCE_BATCH_SIZE

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

mesh

#

Shader defs requirments:

🔴 INSTANCE_BATCH_SIZE

@group(1)
@binding(0)
var<storage> mesh: array<Instance>

morph_weights

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

@group(2)
@binding(2)
var<uniform> morph_weights: MorphWeights

morph_targets

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

@group(2)
@binding(3)
var morph_targets: texture_3d<f32>

morph_weights

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🔴 SKINS_USE_UNIFORM_BUFFERS

@group(2)
@binding(2)
var<storage> morph_weights: array<f32>

morph_targets

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🔴 SKINS_USE_UNIFORM_BUFFERS

@group(2)
@binding(3)
var<storage> morph_targets: array<MorphAttributes>

morph_descriptors

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🔴 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> ,
@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

#

Shader defs requirments:

🟢 MORPH_TARGETS

fn morph_layer_count (
descriptor_index: u32
) -> u32

morph_weight_at

#

Shader defs requirments:

🟢 MORPH_TARGETS

fn morph_weight_at (
weight_index: u32
descriptor_index: u32
) -> f32

morph_component_texture_coord

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

fn morph_component_texture_coord (
vertex_index: u32
component_offset: u32
) -> vec2<u32>

morph_pixel

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

fn morph_pixel (
vertex: u32
component: u32
weight: u32
) -> f32

morph

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

fn morph (
vertex_index: u32
component_offset: u32
weight_index: u32
) -> vec3<f32>

morph_position

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🟢 SKINS_USE_UNIFORM_BUFFERS

fn morph_position (
vertex_index: u32
weight_index: u32
instance_index: u32
) -> vec3<f32>

get_morph_target

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🔴 SKINS_USE_UNIFORM_BUFFERS

fn get_morph_target (
vertex_index: u32
weight_index: u32
descriptor_index: u32
) -> MorphAttributes

morph_position

#

Shader defs requirments:

🟢 MORPH_TARGETS, 🔴 SKINS_USE_UNIFORM_BUFFERS

fn morph_position (
vertex_index: u32
weight_index: u32
descriptor_index: u32
) -> vec3<f32>

morph_vertex

#

Shader defs requirments:

🟢 MORPH_TARGETS

fn morph_vertex (
vertex_in: Vertex
instance_index: u32
) -> Vertex

skin_model

#

Shader defs requirments:

🟢 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 (
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