imlet 0.2.0

A lightweight engine for implicit modeling.
Documentation
// Vertex shader
struct CameraUniform {
    view_proj: mat4x4<f32>,
    camera_location: vec3<f32>,
};
@group(0) @binding(0) // 1.
var<uniform> camera: CameraUniform;

struct VertexInput {
    @location(0) position: vec3<f32>,
    @location(1) normal: vec3<f32>,
};

struct VertexOutput {
    @builtin(position) clip_position: vec4<f32>,
    @location(0) normal: vec3<f32>,
};

@vertex
fn vs_main(
    model: VertexInput,
) -> VertexOutput {
    var out: VertexOutput;
    out.normal = model.normal;
    out.clip_position = camera.view_proj * vec4<f32>(model.position, 1.0);
    return out;
}

// Fragment shader
@fragment
fn fs_main(in: VertexOutput, @builtin(front_facing) front_face: bool) -> @location(0) vec4<f32> {
    // Output the color
    return vec4<f32>(0.5*(1.0 + in.normal[0]), 0.5*(1.0 + in.normal[1]), 0.5*(1.0 + in.normal[2]), 1.0);
}