Crates.io | rafx-resources |
lib.rs | rafx-resources |
version | 0.0.2 |
source | src |
created_at | 2021-01-17 04:45:10.45644 |
updated_at | 2021-01-17 04:45:10.45644 |
description | Rendering framework built on an extensible asset pipeline |
homepage | https://github.com/aclysma/rafx |
repository | https://github.com/aclysma/rafx |
max_upload_size | |
id | 343032 |
size | 437,241 |
This is a multi-backend renderer built on top of the atelier-assets
asset
pipeline. It's intended to be performant, flexible, workflow-friendly, and suitable for use in real-world projects in a
team environment.
The asset pipeline is designed with user workflow in mind (including dedicated artists!), supporting workflow-friendly features like hot reloading assets, including on remote devices. The architecture of the renderer is intended to support advanced use-cases such as streaming, LODs, visibility systems, and multi-threaded draw call submission.
This crate contains several layers:
atelier-assets
NOTE: Some cr
Supported Platforms:
Android might work but I don't have hardware to test with.
References:
^ Video of this renderer running on iOS hardware
Not production ready!
The demo includes:
The demo should be run from the root of the repository. These commands should clone the repo and run the demo.
git clone https://github.com/aclysma/rafx.git
cd rafx
cargo run --bin demo --release
Running in release reduces logging and disables GPU validation. The first time it will load more slowly because it has to import the assets, including a GLTF mesh with large textures. Using profile overrides to optimize upstream crates is highly recommeneded. Asset processing is extremely slow in debug mode. (i.e. 30s instead of 2s)
The demo uses SDL2 and in debug mode, vulkan validation. If you have trouble running the demo, please check that dependencies for both SDL2 and vulkan are available.
The renderer includes a few tools for processing shaders and packing data in a binary blob.
This tool parses GLSL and produces matching rust code. This makes working with descriptor sets easier and safer!
shaders
crate to compile the generated rust code. It's located at /demo/shaders.
Just the rust code is auto-generated, not the Cargo.toml.This tool currently is only useful for packing assets.
run --package cli -- --pack out.pack
run --package demo -- --packfile out.pack
rafx-base
- Shared helpers/data structures. Nothing excitingrafx-api
- Rendering API abstraction layer.
rafx-nodes
- Inspired by the 2015 GDC talk "Destiny's Multithreaded Rendering Architecture." (A low-budget
version and jobs are not actually MT yet)
rafx-visibility
- Placeholder visibility system. Doesn't do anything yet (returns all things visible all the
time). See the GDC talk for more info on how this will work.rafx-resources
- Resource management for images, buffers, descriptor sets, etc.
rafx-assets
- An asset loading and management system.
The demo shows a basic rendering pipeline with a GLTF importer, PBR, bloom, imgui, debug draw, sprites, and dynamic light/shadows. It also demonstrates how to pipeline rendering on a separate thread from simulation.
Licensed under either of
at your option.
The demo/fonts directory contains several fonts under their own licenses:
mplus-1p-regular.ttf
, available under its own license.The assets/blender contains some shaders from from https://freepbr.com, available under its own license
Some dependencies may be licensed under other terms. These licenses include "ISC", "CC0-1.0", "BSD-2-Clause", "BSD-3-Clause", and "Zlib". This is validated on a best-effort basis in every CI run using cargo-deny.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
See LICENSE-APACHE and LICENSE-MIT.