mewgpu 3.7.3-1

Maybe Easier Wgpu (mew), a thin abstraction over wgpu's chaos
//! Example module to show available methods on generated structs. Check the
//! source code to see how they're defined.

crate::vertex_struct! { ExampleVertexStruct step Vertex + 5 [
    0 ints => Uint8,
    1 norms => Snorm8x4,
    2 floats => Float32x3,
] }

crate::buffer! { VertexBuffer <ExampleVertexStruct> as STORAGE | VERTEX | COPY_DST }


crate::shader_struct! { ExampleShaderStruct [
    0 int => I32,
    1 mat => Mat4x4f,
    2 float => F32,
] }

crate::buffer! { ShaderBuffer <ExampleShaderStruct> as STORAGE | COPY_DST }


crate::sampler! { Sampler as Filtering {
    mag_filter: Nearest,
} }

crate::texture! { Texture {
    usage: TEXTURE_BINDING | COPY_DST,
    dimension: D2,
    sample_type: FLOAT,
} }


crate::bind_group! { ExampleBindGroup [
    0 sampler @ FRAGMENT => Sampler,
    1 texture @ FRAGMENT | VERTEX => Texture,
    2 buffer @ VERTEX => ShaderBuffer,
] }


crate::pipeline! { ExamplePipeline {
    bind_groups: [
        0 => ExampleBindGroup,
    ],
    vertex_types: [
        0 => ExampleVertexStruct,
    ],
    fragment_targets: [
        0 => ALPHA_BLENDING ALL as ANY,
    ],
    immediate_size: 4,
    depth: Depth32Float,
    cull: Front,
} }