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.

lines.wgsl

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 ( ) -> VertexOutput

clip_near_plane

#
fn clip_near_plane ( ) -> 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