rusting_engine 2.7.0

Vulkan 3D game engine with GPU-accelerated physics for massive physics-heavy scenes
// Rusting shader packs, version 1: the built-ins a `#rusting vertex 1`
// shader sees. Fields are only ever added at the end.
#ifndef RUSTING_VERTEX_HOOK_GLSL
#define RUSTING_VERTEX_HOOK_GLSL
// What the engine knows about the vertex before the hook runs.
struct VertexInput {
    // Model-space position as stored in the mesh.
    vec3 position;
    // World position after the model transform, wind sway and waves.
    vec3 world_position;
    // World-space normal.
    vec3 normal;
    // Texture coordinates after the material's uv_scale and uv_offset.
    vec2 uv;
    // Vertex color times the material and per-object color.
    vec4 color;
    // Bits 0-15 of the mesh vertex `data`.
    uint block_id;
    // The RUSTING_FLAG_* bits of the mesh vertex `data`, not shifted.
    uint flags;
    // Seconds since the game started.
    float time;
};
// What the engine draws. It starts as the built-in result.
struct VertexOutput {
    vec3 world_position;
    vec3 normal;
    vec4 color;
};
#endif