rendy-pbr
This is a small, realtime physically-based renderer written with rendy
, a 'make-your-own-renderer' toolkit
which builds on gfx-hal
by providing a render graph, compile- and run-time safety checks, and
other helpers. It is a testbed for rendy
and Amethyst; much or all of what is implemented here will eventually be added to the Amethyst renderer in some form.
glTF
importglTF
importBuilding should straightforward, however there is a bit of extra complication compared to a standard Cargo project. First, this repo uses Git LFS to store demo asset files. This means that you need to install git-lfs before cloning the repo, or if you already have cloned it then install git lfs and do another pull, upon which you should download the necessary files.
Note: If you receive an error like rendy_pbr: Exit with Unnamed Error: The Decoder does not support the image format 'Unsupported image format'
upon running, do an explicit git lfs pull
. Because I have it configured to pull from this repo's GitLab mirror's LFS storage, it seems that the repo needs to be cloned first before those settings are updated. Once they are, it will then properly download the LFS files. Also note that downloading the files stored in LFS is not explicitly required if you are providing your own glTF and environment map assets.
Second, one of the dependencies, shaderc, is a little more complex to set up. See the Setup section of the shaderc-rs
repo for more information.
With that done, you should just be able to run
cargo run --features <vulkan | metal> [--release]
If you want to inspect a frame in RenderDoc, there is support for RenderDoc built into the application under the rd
feature flag. It only works with the Vulkan backend currently, so you'll need to be on either Windows or Linux. To use it, you must have renderdoc.dll
/renderdoc.so
on your PATH
. On Windows, this just means adding the RenderDoc folder in Program Files to your path. Then build with:
cargo run --features="vulkan rd" [--release]
See scene.rs
for a description of the scene format, and assets/scene.ron
for an example. Should be able to load
data from any PBR metallic-roughness based glTF assets. If you encounter issues, please open a ticket in the issue
tracker!
* Note: for now model controls are disabled
* Hold shift to subtract a row
FlightHelmet, SciFiHelmet, and Corset models are from the glTF Samples repository. FlightHelmet and Corset were originally created by Microsoft and are licensed under the public domain. SciFiHelmet was created by Michael Pavlovich for Quixel and is licensed under the CC-Attrib 4.0 license.
ElementalSword was created by X-ray on Sketchfab and is under the CC-Attrib-NonCommercial license.