Back home 🏡 WGSL Spec Bevy WGSL Functions

lines.wgsl

Constants

Name Type Value
EPSILON # f32 4.88e-04

Bindings

Name Group Binding index Binding type Type
view # 0 0 <uniform> View
line_gizmo # 1 0 <uniform> LineGizmoUniform

Structures

LineGizmoUniform

#
Name Type Shader Def
line_width f32
depth_bias f32
_padding vec2<f32> 🟢 SIXTEEN_BYTE_ALIGNMENT

VertexInput

#
Annotation Name Type
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

#
Annotation Name Type
builtin(position) clip_position vec4<f32>
location(0) color vec4<f32>
location(1) uv f32

FragmentInput

#
Annotation Name Type
builtin(position) position vec4<f32>
location(0) color vec4<f32>
location(1) uv f32

FragmentOutput

#
Annotation Name Type
location(0) color vec4<f32>

Functions

vertex

#
@vertex
fn vertex(vertex: VertexInput) -> VertexOutput
Parameter Type
vertex VertexInput
Returns: VertexOutput

clip_near_plane

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

fragment_solid

#
@fragment
fn fragment_solid(in: FragmentInput) -> FragmentOutput
Parameter Type
in FragmentInput
Returns: FragmentOutput

fragment_dotted

#
@fragment
fn fragment_dotted(in: FragmentInput) -> FragmentOutput
Parameter Type
in FragmentInput
Returns: FragmentOutput