Back home 🏡 WGSL Spec Bevy WGSL Functions

line_joints.wgsl

Constants

Name Type Value
EPSILON # f32 4.88e-04

Bindings

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

Structures

LineGizmoUniform

#
Name Type Shader Def
line_width f32
depth_bias f32
resolution u32
_padding f32 🟢 SIXTEEN_BYTE_ALIGNMENT

VertexInput

#
Annotation Name Type
location(0) position_a vec3<f32>
location(1) position_b vec3<f32>
location(2) position_c vec3<f32>
location(3) color vec4<f32>
builtin(vertex_index) index u32

VertexOutput

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

FragmentInput

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

FragmentOutput

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

Functions

vertex_bevel

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

vertex_miter

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

vertex_round

#
@vertex
fn vertex_round(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>

depth

#
fn depth(clip: vec4<f32>) -> f32
Parameter Type
clip vec4<f32>
Returns: f32

fragment

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