struct LineVertex {
    @location(0) pos: vec3<f32>,
    @location(1) tex_coord: vec2<f32>,
    @location(2) color: vec4<f32>,
};

struct VertexOutput {
    @builtin(position) pos: vec4<f32>,
    @location(0) tex_coord: vec2<f32>,
    @location(1) color: vec4f,
};

struct CameraUniform {
    view_proj: mat4x4<f32>,
};

@group(0) @binding(0)
var<uniform> camera: CameraUniform;

@vertex
fn vs_main(in: LineVertex) -> VertexOutput {
    var output: VertexOutput;
    output.pos = camera.view_proj * vec4<f32>(in.pos, 1.0);
    output.tex_coord = in.tex_coord;
    output.color = in.color;
    return output;
}

@fragment
fn fs_line(input: VertexOutput) -> @location(0) vec4<f32> {
    return input.color;
}
