Crates.io | sarekt |
lib.rs | sarekt |
version | 0.0.4 |
source | src |
created_at | 2020-03-29 17:31:00.710973 |
updated_at | 2020-05-05 17:38:19.336115 |
description | A rendering engine based on Vulkan, but capable of being expanded to other graphics API backends such as Metal or D3D12 |
homepage | |
repository | https://github.com/brandonpollack23/sarekt |
max_upload_size | |
id | 224129 |
size | 1,590,259 |
This is my third attempt to make something in Vulkan. I think I've accumulated enough knowledge and wherewithal to make something worthwhile.
This is a renderer that has Vulkan first as it's backend that I want to keep relatively low level. I think it'll expose a lot at first, and slowly begin wrapping this again in another wrapper I'll call "Shran", another Star Trek character.
Shran wrapper. Get it?
As a library just include the crate and install the vulkan SDK (need it for shader compilation via glslc and validation layers).
Examples require one extra step: I used to use LFS, but its expensive once people started cloning and using my max bandwidth. If i weren't sharing this I'd use Azure Devops or something, but it's on github, so I hosted the assets in gcs.
I would really appreciate that you didn't use git LFS to pull down the files. I'm not going to renew the upped bandwidth, so please use the setup if you want the asset files :).
So now you need to run setup.sh which just curls the zip and unzips it. If you're on windows use git bash or mingw to run it or something (like I did).
This readme is minimal. Cargo doc is your friend. This is far from done.
The most up to date documentation/usage you'll get is by checkout out the examples (later is better).
Sarekt can load arbitrary models, textures, and uniforms and display them.
Textures can be any image format supported by the image crate and will be converted
Only one pipeline and render pass type.
See the dependencies of this project. Seriously the Rust community is just fantastic.
There are more but these ones I rely on the most, please check them all out.
"Sarek" is the Vulcan father of the character "Spok" of Star Trek. The added t also makes it a portmanteu with rect(angle).
I know and I'm sorry.
All the examples that are straightforward with no params have no section here, just run'em with cargo run --example NAME
Those that have arguments just pass them like so:
cargo run --example 06_textures -- colors
This is where things finally start to get fun,there's a param to enable color mixing with the texture.
Starting with this example, the application coordinate space is right handed y up for simplicity, the ultraviolet library perspective functions correct it for the appropriate backend.
arguments:
Here we can see the depth buffer working in action. Camera moves so you an see the 3d effect.
Flags:
Load a real 3d model (PreBaked lighting only)
Flags:
Enable mip mapping.
Enable MSAA. Does 2 by default
Flags: