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

Bindings

instance_uniforms

#
@group(4)
@binding(0)
var<uniform> instance_uniforms: InstanceUniforms

Structures

InstanceUniforms

#
struct InstanceUniforms {
world_from_local: mat4x4<f32>,
top_color: vec4<f32>,
bottom_color: vec4<f32>,
visibility_range: vec4<f32>,
static_bend_strength: f32,
curve_factor: f32,
translucency: f32,
specular_strength: f32,
specular_power: f32,
}

Vertex

#
struct Vertex {
@location(0)
position: vec3<f32>,
@location(1)
normal: vec3<f32>, VERTEX_NORMALS
@location(2)
uv: vec2<f32>, VERTEX_UVS_A
@location(3)
uv_b: vec2<f32>, VERTEX_UVS_B
@location(4)
tangent: vec4<f32>, VERTEX_TANGENTS
@location(5)
color: vec4<f32>, VERTEX_COLORS
@location(6)
joint_indices: vec4<u32>, SKINNED
@location(7)
joint_weights: vec4<f32>, SKINNED
@location(8)
i_pos_scale: vec4<f32>,
@location(9)
i_index: u32,
}

VertexOutput

#
struct VertexOutput {
@builtin(position)
clip_position: vec4<f32>,
@location(0)
ao: f32,
@location(1)
@interpolate(flat)
visibility_range_dither: i32, VISIBILITY_RANGE_DITHER
@location(2)
world_position: vec3<f32>,
@location(3)
world_normal: vec3<f32>,
@location(4)
uv: vec2<f32>,
@location(5)
local_pos: vec3<f32>,
@location(6)
world_tangent: vec4<f32>,
@location(7)
curve_factor: f32,
}

Functions

vertex

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

get_visibility_range_dither_level

#
Active when
VISIBILITY_RANGE_DITHER
fn get_visibility_range_dither_level (
lod_range: vec4<f32>,
world_position: vec4<f32>
) -> i32

fragment

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment (
@builtin(front_facing)
is_front: bool
) ->
@location(0)
vec4<f32>
Contents