Giter Club home page Giter Club logo

moonshine's Introduction

Moonshine

A general purpose GPU ray traced renderer built with Zig + Vulkan

A bathroom scene rendered with moonshine Salle de bain by nacimus, rendered with Moonshine

Features

  • Binaries
    • offline -- a headless offline renderer
    • online -- a real-time windowed renderer, interactive features WIP
  • Light Transport
    • Global Illumination
    • Direct light sampling with multiple importance sampling for all lights and materials
  • Lights
    • 360° environment maps
    • Emissive meshes
  • Materials
    • Standard PBR with metallic + roughness
    • Mirror
    • Glass

Dependencies

Build

  • zig 0.12.0-dev.168+a31748b29
  • DirectXShaderCompiler
  • For the online (real-time) renderer:
    • For Linux (Ubuntu, similar on others):
      • For Wayland: wayland-protocols libwayland-dev libxkbcommon-dev
      • For X11: libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev
    • Should work on Windows without more dependencies

Run

  • A GPU supporting Vulkan ray tracing

// TODO

  • Feature
    • Bloom
    • Tonemapping
    • HDR display
    • More camera models
      • Orthographic
    • Materials
      • Metal
      • Rough metal
      • Rough glass
      • Plastic
      • Rough plastic
      • Mix
      • Layer
  • Code
    • Make sure we have all necessary errdefers
    • Proper memory allocation interface
    • Reduce unnecessary copying

Current jankiness

  • Asset system
    • Currently, one can either construct a scene manually with code or very inefficiently import glb
    • Ideal would be to have custom scene description format that can be quickly deserialzed
      • An Blender export addon for this format, so other formats don't need to be supported in engine directly
      • I think this custom format would make destinctions between scene stuff and staging stuff. It would only contain actual information about the world, but not stuff like camera position, that would be separate
  • Light system
    • Currently, only support skybox and mesh lights, which I think makes sense
      • Both explicitly sampled using the alias method built on CPU
    • But we'd like to have more dynamic meshes, which means we should mesh sampling build sampling stuff on GPU
      • Not sure about proper route -- build inversion sampler on GPU in compute?
  • Memory management
    • A lot of unncessary copying in scene construction at the moment
      • Filesystem to RAM
      • RAM to staging buffer
      • Staging buffer to GPU
    • Ideally this can be vastly minimized, depending on hardware
      • At most should be doing filesystem to staging buffer
      • On some machines, can do filesystem to GPU directly
  • Destruction queue needs work

Some notes about conventions

  • +z is up
  • phi is azimuthal angle (0-2pi) and theta is polar angle (0-pi)

Some light reading

License

This project is licensed under the AGPL.

moonshine's People

Contributors

ashpil avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.