Back home 🏡 WGSL Spec Bevy WGSL Functions

storage_buffer.wgsl

Bindings

Name Group Binding index Binding type Type
colors # 2 0 <storage, read> array<vec4<f32>, 5>

Structures

Vertex

#
Annotation Name Type
builtin(instance_index) instance_index u32
location(0) position vec3<f32>

VertexOutput

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

Functions

vertex

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

fragment

#
@fragment
fn fragment(mesh: VertexOutput) -> @location(0) vec4<f32>
Parameter Type
mesh VertexOutput
Returns: @location(0) vec4<f32>