Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 2.02 KB

README.md

File metadata and controls

55 lines (41 loc) · 2.02 KB

Goshenite

SDF rendering engine thingy.

Goshenite

If debugging, run with environment variable RUST_BACKTRACE=1 to see anyhow error backtrace.

dependencies

If running in debug mode you need vulkan validation layers installed (I haven't got around to writing code that can detect the presence of layers on different platorms...)

Don't forget to clone the submodules! git submodule update --init

Cargo features

  • colored-term: (default) enables colored terminal log messages.
  • include-spirv-bytes: (default) load spirv bytecode at compile-time. if disabled, the engine will attempt to read spirv files from the ./assets directory at runtime (relative to the executable location).
  • shader-compile: enables a build script to compile spirv binaries whenever shader source is changed. NOTE: will add a notable increase to the build time if you don't already have shaderc libraries installed on your system.

Design objectives

Source split into three directories:

  1. user interface - intuitive, responsive and clear feedback.
  2. renderer - optimized and portable.
  3. engine - idk tbh. extensible? low-coupling? connecting glue between user interface and backend.

Render Stages

        ┆
  ┌───┐ ┆ ┌───┐   ┌───┐   ┌───┐
  │ G │──>│ L │──>│ O │──>│ E │
  └───┘ ┆ └───┘   └───┘   └───┘
        ┆        ╰------┬------╯
subpass ┆ subpass      gui
   0    ┆    1
  1. G = Geometry pass
    • vert shader - bounding boxes
    • frag shader - signed distance field sphere tracing
  2. L = Lighting pass
    • vert shader - full screen triangle
    • frag shader - shading
    • reads input attachment g-buffers
  3. O = Overlay pass - rendered ui elements e.g. coordinate indicators
  4. E = Egui pass - egui stuff

Subpass outputs:

  1. Subpass 0 - g-buffers:
    • rgba8 - normal.xyz, 0
    • u32 - object-id, primitive-id
  2. Subpass 1 - swapchain image