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.

Constants

EPSILON

#
const EPSILON: f32 = 4.88e-04

Bindings

view

#
@group(0)
@binding(0)
var<uniform> view: View

line_gizmo

#
@group(1)
@binding(0)
var<uniform> line_gizmo: LineGizmoUniform

Structures

LineGizmoUniform

#
struct LineGizmoUniform {
world_from_local: mat3x4<f32>,
line_width: f32,
depth_bias: f32,
_joints_resolution: u32,
gap_scale: f32,
line_scale: f32,
_padding: vec3<f32>, SIXTEEN_BYTE_ALIGNMENT
}

VertexInput

#
struct VertexInput {
@location(0)
position_a: vec3<f32>,
@location(1)
position_b: vec3<f32>,
@location(2)
color_a: vec4<f32>,
@location(3)
color_b: vec4<f32>,
@builtin(vertex_index)
index: u32,
}

VertexOutput

#
struct VertexOutput {
@builtin(position)
clip_position: vec4<f32>,
@location(0)
color: vec4<f32>,
@location(1)
uv: f32,
@location(2)
line_fraction: f32,
}

FragmentInput

#
struct FragmentInput {
@builtin(position)
position: vec4<f32>,
@location(0)
color: vec4<f32>,
@location(1)
uv: f32,
@location(2)
line_fraction: f32,
}

FragmentOutput

#
struct FragmentOutput {
@location(0)
color: vec4<f32>,
}

Functions

vertex

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

clip_near_plane

#
fn clip_near_plane (
a: vec4<f32>,
b: vec4<f32>
) -> vec4<f32>

fragment_solid

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment_solid ( ) -> FragmentOutput

fragment_dotted

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment_dotted ( ) -> FragmentOutput

fragment_dashed

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment_dashed ( ) -> FragmentOutput
Contents