nannou_wgpu 0.19.0

Items related to wgpu and its integration in nannou - a creative coding framework for Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
struct VertexOutput {
    @location(0) tex_coords: vec2<f32>,
    @builtin(position) out_pos: vec4<f32>,
};

@vertex
fn main(
    @location(0) pos: vec2<f32>,
) -> VertexOutput {
    let out_pos: vec4<f32> = vec4<f32>(pos, 0.0, 1.0);
    let tex_coords: vec2<f32> = vec2<f32>(pos.x * 0.5 + 0.5, 1.0 - (pos.y * 0.5 + 0.5));
    return VertexOutput(tex_coords, out_pos);
}